if (body->first == NULL) {
/* New chunk */
bd = (HtpBodyChunk *)HTPCalloc(1, sizeof(HtpBodyChunk));
- if (bd == NULL)
- goto error;
+ if (bd == NULL) {
+ SCReturnInt(-1);
+ }
StreamingBufferAppend(body->sb, &bd->sbseg, data, len);
body->content_len_so_far = len;
} else {
bd = (HtpBodyChunk *)HTPCalloc(1, sizeof(HtpBodyChunk));
- if (bd == NULL)
- goto error;
+ if (bd == NULL) {
+ SCReturnInt(-1);
+ }
StreamingBufferAppend(body->sb, &bd->sbseg, data, len);
SCLogDebug("body %p", body);
SCReturnInt(0);
-
-error:
- if (bd != NULL) {
- HTPFree(bd, sizeof(HtpBodyChunk));
- }
- SCReturnInt(-1);
}
/**