From: Russ Combs Date: Wed, 10 Dec 2014 17:54:02 +0000 (-0500) Subject: fix double free found by xcode analysis X-Git-Tag: 3.0.0-233~1091^2~24 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4f52ade89ada9fbe546b43271457af7c33437e4e;p=thirdparty%2Fsnort3.git fix double free found by xcode analysis --- diff --git a/tools/u2spewfoo/u2spewfoo.cc b/tools/u2spewfoo/u2spewfoo.cc index c53b4e4a4..af1bfe65a 100644 --- a/tools/u2spewfoo/u2spewfoo.cc +++ b/tools/u2spewfoo/u2spewfoo.cc @@ -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; }