diff options
author | hejl <> | 2004-03-03 08:40:07 +0000 |
---|---|---|
committer | hejl <> | 2004-03-03 08:40:07 +0000 |
commit | f2539b94c0c65abd21168a509a27228696b7f4ee (patch) | |
tree | a74b17d24934207c8ea35765be1b19a538d724df | |
parent | 9343d98c97ce8130374cd1c6b702c336e1ae0666 (diff) | |
download | lcd4linux-f2539b94c0c65abd21168a509a27228696b7f4ee.tar.gz |
[lcd4linux @ 2004-03-03 08:40:07 by hejl]
Fixed memory leak in hash_get_regex
-rw-r--r-- | hash.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: hash.c,v 1.15 2004/03/03 04:44:16 reinelt Exp $ +/* $Id: hash.c,v 1.16 2004/03/03 08:40:07 hejl Exp $ * * hashes (associative arrays) * @@ -23,6 +23,9 @@ * * * $Log: hash.c,v $ + * Revision 1.16 2004/03/03 08:40:07 hejl + * Fixed memory leak in hash_get_regex + * * Revision 1.15 2004/03/03 04:44:16 reinelt * changes (cosmetics?) to the big patch from Martin * hash patch un-applied @@ -352,6 +355,7 @@ double hash_get_regex (HASH *Hash, char *key, int delay) char buffer[32]; regerror(err, &preg, buffer, sizeof(buffer)); error ("error in regular expression: %s", buffer); + regfree(&preg); return 0.0; } @@ -363,6 +367,7 @@ double hash_get_regex (HASH *Hash, char *key, int delay) sum+=hash_get_delta(Hash, Hash->Items[i].key, delay); } } + regfree(&preg); return sum; } |