diff options
Diffstat (limited to 'camlibs/iclick/iclick.c')
-rw-r--r-- | camlibs/iclick/iclick.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/camlibs/iclick/iclick.c b/camlibs/iclick/iclick.c index 78412e183..3de9c4415 100644 --- a/camlibs/iclick/iclick.c +++ b/camlibs/iclick/iclick.c @@ -87,13 +87,14 @@ icl_init (GPPort *port, CameraPrivateLibrary *priv) for (i=0; i< (0x8000 - 64) && catalog[i+64] ; i+=32) ; priv->nb_entries = i>>5; - catalog_tmp = realloc(catalog, i); if (i) { + catalog_tmp = realloc(catalog, i); if (catalog_tmp) priv->catalog = catalog_tmp; else priv->catalog = catalog; } else { + free(catalog); priv->catalog = NULL; /* We just have freed catalog_tmp */ } |