From: Victor Julien Date: Mon, 16 Sep 2013 14:26:11 +0000 (+0200) Subject: Coverity 1038138 fix X-Git-Tag: suricata-2.0beta2~367 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3cf3b485f2becb29a765a0bf0d59105c41309aa1;p=thirdparty%2Fsuricata.git Coverity 1038138 fix Clean up parsing code to suppress Coverity: Dereference before null check (REVERSE_INULL) Proper checking was already done. --- diff --git a/src/detect-threshold.c b/src/detect-threshold.c index 11beed7ef6..1e935e28c6 100644 --- a/src/detect-threshold.c +++ b/src/detect-threshold.c @@ -152,11 +152,8 @@ static DetectThresholdData *DetectThresholdParse (char *rawstr) if(strstr(threshold_opt,"track")) track_found++; } - - if (copy_str != NULL) { - SCFree(copy_str); - copy_str = NULL; - } + SCFree(copy_str); + copy_str = NULL; if(count_found != 1 || second_found != 1 || type_found != 1 || track_found != 1) goto error; @@ -226,8 +223,6 @@ error: } if (de != NULL) SCFree(de); - if (copy_str != NULL) - SCFree(copy_str); return NULL; }