]> granicus.if.org Git - php/commitdiff
Fixed SIGSEGV when restoring WSDL without functions from cache
authorDmitry Stogov <dmitry@php.net>
Mon, 31 Jan 2005 15:08:24 +0000 (15:08 +0000)
committerDmitry Stogov <dmitry@php.net>
Mon, 31 Jan 2005 15:08:24 +0000 (15:08 +0000)
ext/soap/php_sdl.c

index 9051100105a1a2a2ba3ef8ad5c7d304a46b99cac..9b526110e8ccc9c355e3062b3dda9fd45ca34064 100644 (file)
@@ -1506,8 +1506,8 @@ static sdlPtr get_sdl_from_cache(const char *fn, const char *uri, time_t t)
 
        /* deserialize functions */
        WSDL_CACHE_GET_INT(num_func, &in);
+       zend_hash_init(&sdl->functions, num_func, NULL, delete_function, 0);
        if (num_func > 0) {
-               zend_hash_init(&sdl->functions, num_func, NULL, delete_function, 0);
                functions = emalloc(num_func*sizeof(sdlFunctionPtr));
                for (i = 0; i < num_func; i++) {
                        int binding_num, num_faults;