]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
fix double free found by xcode analysis
authorRuss Combs <rucombs@cisco.com>
Wed, 10 Dec 2014 17:54:02 +0000 (12:54 -0500)
committerRuss Combs <rucombs@cisco.com>
Wed, 10 Dec 2014 17:54:02 +0000 (12:54 -0500)
tools/u2spewfoo/u2spewfoo.cc

index c53b4e4a4ea5f61d03578dfb4f179078ef8645d4..af1bfe65ade600d0ffeb51b8381d94c781a2cb08 100644 (file)
@@ -141,6 +141,7 @@ static int get_record(u2iterator *it, u2record *record) {
     {
         puts("get_record: (2) Failed to allocate memory.");
         free(record->data);
+        record->data = nullptr;
         return FAILURE;
     }