libclamav: cleaner textAddMessage(), cid #10532

remotes/push_mirror/0.98.1
David Raynor 12 years ago
parent 265427cefc
commit 5a36f2b933
  1. 9
      libclamav/text.c

@ -1,5 +1,5 @@
/*
* Copyright (C) 2007-2008 Sourcefire, Inc.
* Copyright (C) 2007-2013 Sourcefire, Inc.
*
* Authors: Nigel Horne
*
@ -226,8 +226,11 @@ textAddMessage(text *aText, message *aMessage)
else {
text *anotherText = messageToText(aMessage);
if(aText)
return textMove(aText, anotherText);
if(aText) {
text *newHead = textMove(aText, anotherText);
free(anotherText);
return newHead;
}
return anotherText;
}
}

Loading…
Cancel
Save