Date: Sun Feb 16 00:53:54 CET 2003
User: Derick Rethans
Directory: srm/main/src
Log Message:
[0.10]
- Onb0rk the ini parser memory stuff
Modified files:
srm/main/src/srm_ini_parser.y (version: 1.17)
srm/main/src/srm_ini_scanner.l (version: 1.12)
[FILE: /srm/main/src/srm_ini_parser.y]
--- srm/main/src/srm_ini_parser.y:1.16 Sun Feb 10 18:54:27 2002 GMT
+++ srm/main/src/srm_ini_parser.y Sat Feb 15 22:53:54 2003 GMT
@@ -1,5 +1,5 @@
%{
-/* $Id: cvstemp,v 1.16 2002/02/10 19:54:27 sterling Exp $ */
+/* $Id: cvstemp,v 1.17 2003/02/15 23:53:54 derick Exp $ */
/* The contents of this file are subject to the Vulcan Logic Public
* License Version 1.1 (the "License"); you may not use this file
@@ -129,7 +129,8 @@
tmp_hash = srm_hash_alloc(64, SRM_VALUE_FREE);
VALP_SET_HASH(tmp_val);
SRMVALP_HASH(tmp_val) = tmp_hash;
- srm_hash_add (hash_pointer[nest_level], srm_ini_lval.sval, strlen(srm_ini_lval.sval), tmp_val);
+ srm_hash_add (hash_pointer[nest_level], srm_ini_lval.sval, strlen(srm_ini_lval.sval), tmp_val);
+ free(srm_ini_lval.sval);
nest_level++;
hash_pointer[nest_level] = tmp_hash;
}
@@ -149,6 +150,7 @@
{
tmp_key = strdup (srm_ini_lval.sval);
tmp_key_len = strlen (srm_ini_lval.sval);
+ free(srm_ini_lval.sval);
}
T_ASSIGN value T_SEMI_COLON
{
[FILE: /srm/main/src/srm_ini_scanner.l]
--- srm/main/src/srm_ini_scanner.l:1.11 Sat Feb 15 22:48:58 2003 GMT
+++ srm/main/src/srm_ini_scanner.l Sat Feb 15 22:53:54 2003 GMT
@@ -1,5 +1,5 @@
%{
-/* $Id: cvstemp,v 1.11 2003/02/15 23:48:58 derick Exp $ */
+/* $Id: cvstemp,v 1.12 2003/02/15 23:53:54 derick Exp $ */
/* The contents of this file are subject to the Vulcan Logic Public
* License Version 1.1 (the "License"); you may not use this file
@@ -54,7 +54,7 @@
}
[a-z][a-z0-9_]+ {
- srm_ini_lval.sval = yytext;
+ srm_ini_lval.sval = (char*) strdup(yytext);
return LABEL;
}
Received on Sun Feb 16 00:53:56 2003
This archive was generated by hypermail 2.1.8 : Tue Jan 06 2009 - 03:00:03 CET