[80467] branches/gsoc11-rev-upgrade/base/src/libmachista1.0/tests/ libmachista-test.c

cal at macports.org cal at macports.org
Wed Jul 13 08:14:11 PDT 2011


Revision: 80467
          http://trac.macports.org/changeset/80467
Author:   cal at macports.org
Date:     2011-07-13 08:14:11 -0700 (Wed, 13 Jul 2011)
Log Message:
-----------
rev-upgrade: Fixed memory leaks in the unit test

Modified Paths:
--------------
    branches/gsoc11-rev-upgrade/base/src/libmachista1.0/tests/libmachista-test.c

Modified: branches/gsoc11-rev-upgrade/base/src/libmachista1.0/tests/libmachista-test.c
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/libmachista1.0/tests/libmachista-test.c	2011-07-13 15:06:02 UTC (rev 80466)
+++ branches/gsoc11-rev-upgrade/base/src/libmachista1.0/tests/libmachista-test.c	2011-07-13 15:14:11 UTC (rev 80467)
@@ -204,6 +204,9 @@
 						printf("\tLibrary current version mismatch. Expected `%s', was `%s'\n", lib_curr_version, ref_lib_curr_version);
 						exit(EXIT_FAILURE);
 					}
+
+					free(ref_lib_curr_version);
+					free(ref_lib_comp_version);
 					break;
 				}
 			}
@@ -328,6 +331,7 @@
 		printf("\tmacho_format_dylib_version(0x1) should be 0.0.1, but is `%s'\n", version_string);
 		goto error_out;
 	}
+	free(version_string);
 
 	puts("\tOK");
 	return true;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110713/b5e69c92/attachment.html>


More information about the macports-changes mailing list