summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-01-25 15:58:09 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-01-25 15:58:09 -0800
commit39a79e0c4676c9a0d1d81f36a0941d17ef2524fc (patch)
treeb9b13dd4440a81c2b63db7da6ffb15349dc83476
parent27d51ce1d7a5e1f729f069078fade51e126db15f (diff)
downloadsubsurface-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk-gui.c b/gtk-gui.c
index 94866d9e5..8817d05b8 100644
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -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);
}