sniper Sun Mar 18 01:25:40 2001 EDT
Modified files:
/php4/ext/fdf fdf.c
Log:
Prevent mem leak
Index: php4/ext/fdf/fdf.c
diff -u php4/ext/fdf/fdf.c:1.41 php4/ext/fdf/fdf.c:1.42
--- php4/ext/fdf/fdf.c:1.41 Sat Mar 17 21:52:40 2001
+++ php4/ext/fdf/fdf.c Sun Mar 18 01:25:40 2001
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: fdf.c,v 1.41 2001/03/18 05:52:40 sniper Exp $ */
+/* $Id: fdf.c,v 1.42 2001/03/18 09:25:40 sniper Exp $ */
/* FdfTk lib 2.0 is a Complete C/C++ FDF Toolkit available from
http://beta1.adobe.com/ada/acrosdk/forms.html. */
@@ -812,6 +812,7 @@
err =
FDFGetValue(theFDF,name,value,value_len-1,&nBytes);
if(err == FDFErcOK && nBytes != 0) {
for(p=value;*p;p++) if(*p=='\r') *p='\n';
+ if(lastfieldname) efree(lastfieldname);
lastfieldname = estrdup(name);
php_register_variable(name, value, array_ptr
ELS_CC PLS_CC);
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]