file_data smtp: fix minor coverity warning

CID 1298891:  Null pointer dereferences  (REVERSE_INULL)
Null-checking "curr_file" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
pull/1564/merge
Victor Julien 10 years ago
parent bcff35fd9f
commit dd2afd51f7

@ -144,7 +144,6 @@ static uint8_t *DetectEngineSMTPGetBufferForTX(uint64_t tx_id,
goto end;
}
if (curr_file != NULL) {
int first = 1;
curr_chunk = curr_file->chunks_head;
while (curr_chunk != NULL) {
@ -189,7 +188,6 @@ static uint8_t *DetectEngineSMTPGetBufferForTX(uint64_t tx_id,
/* updat inspected tracker */
curr_file->content_inspected = curr_file->chunks_tail->stream_offset + curr_file->chunks_tail->len;
}
buffer = det_ctx->smtp[index].buffer;
*buffer_len = det_ctx->smtp[index].buffer_len;

Loading…
Cancel
Save