PERFORCE change 144048 for review

Gabor Kovesdan gabor at FreeBSD.org
Tue Jun 24 20:12:19 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=144048

Change 144048 by gabor at gabor_server on 2008/06/24 20:11:19

	- Add forgotten free()

Affected files ...

.. //depot/projects/soc2008/gabor_textproc/grep/binary.c#12 edit

Differences ...

==== //depot/projects/soc2008/gabor_textproc/grep/binary.c#12 (text+ko) ====

@@ -84,7 +84,10 @@
 
 	/* XXX knows too much about mmf internals */
 	for (i = 0; i < BUFSIZ && i < f->len; i++)
-		if (iswbinary(wbuf[i]))
+		if (iswbinary(wbuf[i])) {
+			free(wbuf);
 			return (1);
+	}
+	free(wbuf);
 	return (0);
 }


More information about the p4-projects mailing list