[Pcre-svn] [611] code/trunk: Fix small memory leak in error …

Top Page
Delete this message
Author: Subversion repository
Date:  
To: pcre-svn
Subject: [Pcre-svn] [611] code/trunk: Fix small memory leak in error code path.
Revision: 611
          http://www.exim.org/viewvc/pcre2?view=rev&revision=611
Author:   ph10
Date:     2016-12-08 16:52:26 +0000 (Thu, 08 Dec 2016)
Log Message:
-----------
Fix small memory leak in error code path.


Modified Paths:
--------------
    code/trunk/ChangeLog
    code/trunk/src/pcre2test.c


Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2016-11-27 16:14:33 UTC (rev 610)
+++ code/trunk/ChangeLog    2016-12-08 16:52:26 UTC (rev 611)
@@ -196,7 +196,9 @@
 28. Implemented pcre2_code_copy_with_tables(), and added pushtablescopy to
 pcre2test for testing it.


+29. Fix small memory leak in pcre2test.

+
Version 10.22 29-July-2016
--------------------------


Modified: code/trunk/src/pcre2test.c
===================================================================
--- code/trunk/src/pcre2test.c    2016-11-27 16:14:33 UTC (rev 610)
+++ code/trunk/src/pcre2test.c    2016-12-08 16:52:26 UTC (rev 611)
@@ -4494,6 +4494,7 @@
   if (fread(serial, 1, serial_size, f) != serial_size)
     {
     fprintf(outfile, "** Wrong return from fread()\n");
+    free(serial);
     return PR_ABEND;
     }
   fclose(f);