Skip to content

Commit

Permalink
dt guides: fix memory leak
Browse files Browse the repository at this point in the history
Direct leak of 20 byte(s) in 1 object(s) allocated from:
    #0 0x7f62a93db37a in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9437a)
    #1 0x7f62a8ede41e in dt_guides_init /home/ed/programming/workspace/darktable/src/gui/guides.c:414
    #2 0x7f62a8d2b9fd in dt_init /home/ed/programming/workspace/darktable/src/common/darktable.c:872
    #3 0x400aef in main /home/ed/programming/workspace/darktable/src/main.c:24
    #4 0x7f62a2c02b44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b44)
  • Loading branch information
edgomez committed Nov 2, 2015
1 parent 3c07c12 commit 336c6ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/guides.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ GList *dt_guides_init()
{
_golden_mean_t *user_data = (_golden_mean_t *)malloc(sizeof(_golden_mean_t));
_golden_mean_set_data(user_data, dt_conf_get_int("plugins/darkroom/clipping/golden_extras"));
_guides_add_guide(&guides, _("golden mean"), _guides_draw_golden_mean, _guides_gui_golden_mean, user_data, NULL);
_guides_add_guide(&guides, _("golden mean"), _guides_draw_golden_mean, _guides_gui_golden_mean, user_data, free);
}

return guides;
Expand Down

0 comments on commit 336c6ff

Please sign in to comment.