From 2ea9b8786e23add34e1da20c141e8c9c292cb746 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Thu, 7 Aug 2014 07:50:27 -0400 Subject: [PATCH] Hooks - It is safe to call free() with a null pointer. --- src/Hooks.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Hooks.cpp b/src/Hooks.cpp index 97fa96ed2..ce89774e4 100644 --- a/src/Hooks.cpp +++ b/src/Hooks.cpp @@ -375,8 +375,8 @@ int Hooks::execute ( output += line; } - if (line) - free (line); + free (line); + line = NULL; fclose (poutf); close (pout[0]);