projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b82445c
)
when failing by OOM, don't loose any more memory.
author
Wilfried Goesgens
<dothebart@citadel.org>
Thu, 31 May 2012 21:43:32 +0000
(23:43 +0200)
committer
Wilfried Goesgens
<dothebart@citadel.org>
Thu, 31 May 2012 21:43:32 +0000
(23:43 +0200)
citadel/msgbase.c
patch
|
blob
|
history
diff --git
a/citadel/msgbase.c
b/citadel/msgbase.c
index 706230774bff5bcebf07eef3c733c7bf746fe340..a1acc98c4221cf7832a5a398bf4e8a6518b7152a 100644
(file)
--- a/
citadel/msgbase.c
+++ b/
citadel/msgbase.c
@@
-2753,6
+2753,7
@@
int CtdlSaveMsgPointersInRoom(char *roomname, long newmsgidlist[], int num_newms
msglist = realloc(msglist, (sizeof(long) * (num_msgs + num_msgs_to_be_merged)) );
if (msglist == NULL) {
MSGM_syslog(LOG_ALERT, "ERROR: can't realloc message list!\n");
+ free(msgs_to_be_merged);
return (ERROR + INTERNAL_ERROR);
}
memcpy(&msglist[num_msgs], msgs_to_be_merged, (sizeof(long) * num_msgs_to_be_merged) );