]> granicus.if.org Git - php/commitdiff
fix compilation
authorStanislav Malyshev <stas@php.net>
Sun, 19 Oct 2003 10:36:36 +0000 (10:36 +0000)
committerStanislav Malyshev <stas@php.net>
Sun, 19 Oct 2003 10:36:36 +0000 (10:36 +0000)
win32/registry.c

index c2f4666587eed7ac351b912e6c1c739f82dcdbf7..c9a324b628df43762fd99c5fb75f6232b758da33 100644 (file)
@@ -97,8 +97,8 @@ char *GetIniPathFromRegistry()
        HKEY hKey;
        
        if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, PHP_REGISTRY_KEY, 0, KEY_READ, &hKey) == ERROR_SUCCESS) {
-               reg_location = emalloc(MAXPATHLEN+1);
                DWORD buflen = MAXPATHLEN;
+               reg_location = emalloc(MAXPATHLEN+1);
                if(RegQueryValueEx(hKey, PHPRC_REGISTRY_NAME, 0, NULL, reg_location, &buflen) != ERROR_SUCCESS) {
                        efree(reg_location);
                        reg_location = NULL;