summaryrefslogtreecommitdiff
path: root/common/compat.c
diff options
context:
space:
mode:
authorStef Walter <stef@thewalter.net>2004-04-07 22:02:34 +0000
committerStef Walter <stef@thewalter.net>2004-04-07 22:02:34 +0000
commita6725d9e37f128a4e4127f6a5032d928d3e9b2ce (patch)
tree1a604df069bad39f310f3d7f03e762779dbc4af8 /common/compat.c
parent12f359d812dcf7ccbff057f192f49402750375d7 (diff)
Fixed memory leaks
Diffstat (limited to 'common/compat.c')
-rw-r--r--common/compat.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/common/compat.c b/common/compat.c
index ff8d527..e1bddef 100644
--- a/common/compat.c
+++ b/common/compat.c
@@ -443,13 +443,14 @@ char* strlwr(char *string)
#ifndef HAVE_REALLOCF
+#undef reallocf
-void* reallocf(void* ptr, size_t size)
+void* reallocf(void* pt, size_t sz)
{
- void* ret = realloc(ptr, size);
+ void* ret = realloc(pt, sz);
- if(!ret && size)
- free(ptr);
+ if(!ret && sz)
+ free(pt);
return ret;
}