summaryrefslogtreecommitdiff
path: root/PC
diff options
context:
space:
mode:
Diffstat (limited to 'PC')
-rw-r--r--PC/getpathp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/PC/getpathp.c b/PC/getpathp.c
index 2bd3f2653f..729d2e4736 100644
--- a/PC/getpathp.c
+++ b/PC/getpathp.c
@@ -297,6 +297,10 @@ getpythonregpath(HKEY keyBase, int skipcore)
}
RegCloseKey(subKey);
}
+
+ /* return null if no path to return */
+ if (dataSize == 0) goto done;
+
/* original datasize from RegQueryInfo doesn't include the \0 */
dataBuf = malloc((dataSize+1) * sizeof(TCHAR));
if (dataBuf) {