From e37c0d2eb84d96ef4decc64504c93c7f114e9ac2 Mon Sep 17 00:00:00 2001 From: Michael Meskes Date: Mon, 24 Apr 2006 09:45:44 +0000 Subject: Fixed memory leak bugs found by Martijn Oosterhout. --- src/interfaces/ecpg/compatlib/informix.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/interfaces/ecpg/compatlib/informix.c') 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 -- cgit v1.2.3