diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-01-25 15:58:09 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-01-25 15:58:09 -0800 |
commit | 39a79e0c4676c9a0d1d81f36a0941d17ef2524fc (patch) | |
tree | b9b13dd4440a81c2b63db7da6ffb15349dc83476 | |
parent | 27d51ce1d7a5e1f729f069078fade51e126db15f (diff) | |
download | subsurface-39a79e0c4676c9a0d1d81f36a0941d17ef2524fc.tar.gz |
Fix memory leak in set_dc_nickname
remember_dc() already does a strdup of the nickname.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | gtk-gui.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1935,7 +1935,7 @@ void set_dc_nickname(struct dive *dive) gtk_widget_show_all(dialog); if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) { if (strcmp(dc->model, gtk_entry_get_text(GTK_ENTRY(entry)))) { - name = strdup(gtk_entry_get_text(GTK_ENTRY(entry))); + name = gtk_entry_get_text(GTK_ENTRY(entry)); remember_dc(dc->model, dc->deviceid, name); mark_divelist_changed(TRUE); } |