diff --git a/ext/sybase_ct/php_sybase_ct.c b/ext/sybase_ct/php_sybase_ct.c index 5429a3c88d9..e3dc415f839 100644 --- a/ext/sybase_ct/php_sybase_ct.c +++ b/ext/sybase_ct/php_sybase_ct.c @@ -777,7 +777,7 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) } sybase_ptr = (sybase_link *) malloc(sizeof(sybase_link)); - if (sybase_ptr) { + if (!sybase_ptr) { efree(hashed_details); RETURN_FALSE; }