projects
/
platform
/
upstream
/
libexif.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8e917db
)
added error handling on realloc
author
Jörg Hoh
<hohjg@users.sourceforge.net>
Sun, 16 May 2004 14:06:37 +0000
(16:06 +0200)
committer
Jörg Hoh
<hohjg@users.sourceforge.net>
Sun, 16 May 2004 14:06:37 +0000
(16:06 +0200)
added a missing realloc when removing entries
libexif/exif-content.c
patch
|
blob
|
history
diff --git
a/libexif/exif-content.c
b/libexif/exif-content.c
index
fbbbe49
..
bb720dc
100644
(file)
--- a/
libexif/exif-content.c
+++ b/
libexif/exif-content.c
@@
-109,6
+109,8
@@
exif_content_add_entry (ExifContent *content, ExifEntry *entry)
entry->parent = content;
content->entries = realloc (content->entries,
sizeof (ExifEntry) * (content->count + 1));
+ if (!content->entries)
+ return;
content->entries[content->count] = entry;
exif_entry_ref (entry);
content->count++;
@@
-132,6
+134,7
@@
exif_content_remove_entry (ExifContent *c, ExifEntry *e)
c->count--;
e->parent = NULL;
exif_entry_unref (e);
+ c->entries = realloc(c->entries,sizeof(ExifEntry) * c->count);
}
ExifEntry *