[Pinfo-devel] r221 - pinfo/trunk/src
Bas Zoetekouw
bas at costa.debian.org
Sat Sep 10 15:23:50 UTC 2005
Author: bas
Date: 2005-09-10 15:23:50 +0000 (Sat, 10 Sep 2005)
New Revision: 221
Modified:
pinfo/trunk/src/utils.c
Log:
Oops, forgot to free() a local variable in check_node_name()
Modified: pinfo/trunk/src/utils.c
===================================================================
--- pinfo/trunk/src/utils.c 2005-09-10 15:06:55 UTC (rev 220)
+++ pinfo/trunk/src/utils.c 2005-09-10 15:23:50 UTC (rev 221)
@@ -565,7 +565,13 @@
/* so, now str_start point to a \0-terminated string containing the
* node name from the header.
* Let's compare it with the node_name we're looking for */
- if ( strcmp(str_start, node_name)==0 )
+ res = strcmp(str_start, node_name);
+
+ /* we're done, so free alloc'ed vars */
+ xfree(header);
+
+ /* check result of strcmp() and return */
+ if ( res==0 )
{
/* match found */
return 1;
More information about the Pinfo-devel
mailing list