diff options
author | Michael Meskes <meskes@postgresql.org> | 2006-04-24 09:45:44 +0000 |
---|---|---|
committer | Michael Meskes <meskes@postgresql.org> | 2006-04-24 09:45:44 +0000 |
commit | e37c0d2eb84d96ef4decc64504c93c7f114e9ac2 (patch) | |
tree | 81225be1d46f4e73c5ce45fa49058bd8d4887379 /src/interfaces/ecpg/compatlib/informix.c | |
parent | 499ec8c7e48b271e313d4a594074e702139f3721 (diff) | |
download | postgresql-e37c0d2eb84d96ef4decc64504c93c7f114e9ac2.tar.gz postgresql-e37c0d2eb84d96ef4decc64504c93c7f114e9ac2.zip |
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 | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/interfaces/ecpg/compatlib/informix.c b/src/interfaces/ecpg/compatlib/informix.c index 0cb45100429..b56929441cc 100644 --- a/src/interfaces/ecpg/compatlib/informix.c +++ b/src/interfaces/ecpg/compatlib/informix.c @@ -164,15 +164,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 |