]> 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:36 +0000 (15:08 +0000)
committerDmitry Stogov <dmitry@php.net>
Mon, 31 Jan 2005 15:08:36 +0000 (15:08 +0000)
ext/soap/php_sdl.c

index 3d21103ebc7a79295a87134090197254c5665bf1..be10c0c3af12bf880f2d7cb4ae81c4d803c63113 100644 (file)
@@ -1507,8 +1507,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;