2004-11-11 Lutz Mueller <lutz@users.sourceforge.net>
authorLutz Mueller <lutz.s.mueller@gmail.com>
Thu, 11 Nov 2004 20:13:27 +0000 (21:13 +0100)
committerLutz Mueller <lutz.s.mueller@gmail.com>
Thu, 11 Nov 2004 20:13:27 +0000 (21:13 +0100)
* libexif/*: Replace another few realloc by exif_mem_realloc.

ChangeLog
libexif/canon/exif-mnote-data-canon.c
libexif/olympus/exif-mnote-data-olympus.c

index c34c780..009dbcf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2004-11-11  Lutz Mueller <lutz@users.sourceforge.net>
+
+       * libexif/*: Replace another few realloc by exif_mem_realloc.
+
 2004-11-10  Lutz Mueller <lutz@users.sourceforge.net>
 
        * libexif/*.c: Change #include "" to #include <>.
index 99a8b1c..08113dc 100644 (file)
@@ -178,7 +178,8 @@ exif_mnote_data_canon_save (ExifMnoteData *ne,
                                                n->entries[i].components;
                if (s > 4) {
                        *buf_size += s;
-                       *buf = realloc (*buf, sizeof (char) * *buf_size);
+                       *buf = exif_mem_realloc (ne->mem, *buf,
+                                                sizeof (char) * *buf_size);
                        if (!*buf) return;
                        doff = *buf_size - s;
                        exif_set_long (*buf + o, n->order, n->offset + doff);
@@ -211,7 +212,8 @@ exif_mnote_data_canon_load (ExifMnoteData *ne,
            if (o + 8 > buf_size) return;
 
            n->count = i + 1;
-           n->entries = realloc (n->entries, sizeof (MnoteCanonEntry) * (i+1));
+           n->entries = exif_mem_realloc (ne->mem, n->entries,
+                                          sizeof (MnoteCanonEntry) * (i+1));
            memset (&n->entries[i], 0, sizeof (MnoteCanonEntry));
            n->entries[i].tag        = exif_get_short (buf + o, n->order);
            n->entries[i].format     = exif_get_short (buf + o + 2, n->order);
index 987a3de..d08f78f 100644 (file)
@@ -139,7 +139,8 @@ exif_mnote_data_olympus_save (ExifMnoteData *ne,
                if (s > 4) {
                        doff = *buf_size;
                        *buf_size += s;
-                       *buf = realloc (*buf, *buf_size);
+                       *buf = exif_mem_realloc (ne->mem, *buf,
+                                                sizeof (char) * *buf_size);
                        if (!*buf) return;
                        exif_set_long (*buf + o, n->order, datao + doff);
                } else