summaryrefslogtreecommitdiff
path: root/src/xsane.c
diff options
context:
space:
mode:
authorJulien BLACHE <jblache@debian.org>2008-11-26 22:35:41 +0100
committerMattia Rizzolo <mattia@mapreri.org>2014-10-03 14:05:48 +0000
commitb85ae08349167bed47c71ed7ace8acd275b9ab22 (patch)
tree94694d586ca7782fb453bf07c5251e02b52843d9 /src/xsane.c
parente5485fc0e6e11763f1e4d309c5ccced01802974d (diff)
parentdc7150ada6000f0c8e6ee61da9598573d3b63b7f (diff)
Imported Debian patch 0.996-1debian/0.996-1
Diffstat (limited to 'src/xsane.c')
-rw-r--r--src/xsane.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/xsane.c b/src/xsane.c
index 7c5c5fa..8c65e33 100644
--- a/src/xsane.c
+++ b/src/xsane.c
@@ -2783,7 +2783,7 @@ static gint xsane_medium_delete_callback(GtkWidget *widget, GtkWidget *medium_wi
{
DBG(DBG_info ,"deleting %s\n", preferences.medium[selection]->name);
- free(preferences.medium[selection]);
+ // free(preferences.medium[selection]);
preferences.medium_definitions--;
@@ -2791,6 +2791,7 @@ static gint xsane_medium_delete_callback(GtkWidget *widget, GtkWidget *medium_wi
{
preferences.medium[i] = preferences.medium[i+1];
}
+ preferences.medium = realloc(preferences.medium, preferences.medium_definitions * sizeof(void *)); // NEW
if (preferences.medium_nr == selection)
{