diff options
author | Michael Meskes <meskes@postgresql.org> | 2006-04-24 09:45:22 +0000 |
---|---|---|
committer | Michael Meskes <meskes@postgresql.org> | 2006-04-24 09:45:22 +0000 |
commit | 524d65d459781c77e8d707a04a24360a05b6ab77 (patch) | |
tree | cca677159aa32d4cabfb644a66d5ad3fe81c8a62 /src/interfaces/ecpg/compatlib/informix.c | |
parent | a16ffee73bcf017638849abd7be6f0269bc37964 (diff) |
Fixed memory leak bugs found by Martijn Oosterhout.
Diffstat (limited to 'src/interfaces/ecpg/compatlib/informix.c')
-rw-r--r-- | src/interfaces/ecpg/compatlib/informix.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/interfaces/ecpg/compatlib/informix.c b/src/interfaces/ecpg/compatlib/informix.c index 4604c6e797d..84c2574e15c 100644 --- a/src/interfaces/ecpg/compatlib/informix.c +++ b/src/interfaces/ecpg/compatlib/informix.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/compatlib/informix.c,v 1.41 2006/03/11 04:38:39 momjian Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/compatlib/informix.c,v 1.42 2006/04/24 09:45:22 meskes Exp $ */ #include <stdlib.h> #include <string.h> @@ -166,15 +166,15 @@ ecpg_strndup(const char *str, size_t len) int deccvasc(char *cp, int len, decimal *np) { - char *str = ecpg_strndup(cp, len); /* decimal_in always converts - * the complete string */ - int ret = 0; - numeric *result; + char *str; + int ret = 0; + numeric *result; rsetnull(CDECIMALTYPE, (char *) np); if (risnull(CSTRINGTYPE, cp)) return 0; + str = ecpg_strndup(cp, len); /* decimal_in always converts the complete string */ if (!str) ret = ECPG_INFORMIX_NUM_UNDERFLOW; else |