Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • J jami-client-gnome
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 88
    • Issues 88
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • savoirfairelinux
  • jami-client-gnome
  • Issues
  • #917
Closed
Open
Created Sep 13, 2018 by Hugo Lefeuvre@hlefeuvreDeveloper20 of 20 tasks completed20/20 tasks

Various memory leaks, hazardous frees, untranslated strings and wrong return values

I did a small source code audit and found following minor bugs. They are not important enough to deserve dedicated bug reports, so let's put them in a juicy meta bug.

ringwelcomeview:

  • memory leak

  • ring_welcome_update_view() does not free ring_id properly

  • render_account_avatar() leaks id.

  • return value

  • draw_qrcode() should return FALSE if we failed to generate a qrcode.

usernameregistrationbox:

  • l18n

  • "Enter the password of your Ring account" is not translated in button_register_username_clicked().

ringnotify:

  • free not allocated memory

  • ~RingNotifyServerInfo() frees name, vendor, etc. but those are only allocated if USE_LIBNOTIFY is defined. If not, this is undefined behavior and might very well end up crashing. Same if notify_get_server_info() returns FALSE.

  • return value

  • ring_hide_notification() always returns FALSE.

video_widget:

  • memory leak

  • potential list leak in case of error in video_widget_on_drag_data_received()

  • free not allocated memory

  • in switch_video_input_file(): uri might be NULL even if the answer of the dialog is GTK_RESPONSE_ACCEPT. We should check before freeing

ring_client:

  • memory leak

  • ring_client_open() does not free call_id properly.

  • ring_client_open() leaks the result of g_file_get_uri_scheme(*file), which is never freed properly.

webkitchatcontainer:

  • return value

  • webview_chat_context_menu() always returns false.

  • invalid casts

  • webkit_chat_container_execute_js should take const char* instead of char* (invalid const char* to char* cast otherwise)

ringmainwindow:

  • memory leak

  • multiple memory leaks in print_account_and_state()

  • on_clear_all_history_foreach() leaks account_id

  • changeAccountSelection() leaks account_id

  • dead code

  • on_save_accounts_timeout() is defined but not used.

  • on_show_add_account() is defined but not used.

  • several defined but unused variables

  • several defined but unused parameters

  • bad printf formatter

  • multiple places where char* is passed to printf-style function with %i formatter

Edited Sep 20, 2018 by Hugo Lefeuvre
Assignee
Assign to
Time tracking