summaryrefslogtreecommitdiff
path: root/src/xsane.c
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2014-10-03 14:05:45 +0000
committerMattia Rizzolo <mattia@mapreri.org>2014-10-03 14:05:45 +0000
commitdc7150ada6000f0c8e6ee61da9598573d3b63b7f (patch)
treed202e9601485fce914f1f692f6356c4fd961ee81 /src/xsane.c
parent41b1173190f702693b0b4fd2654cf2dc28a447f4 (diff)
Imported Upstream version 0.996upstream/0.996
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)
{