]> granicus.if.org Git - python/commitdiff
bpo-38236: Fix init_dump_ascii_wstr() (GH-16333)
authorVictor Stinner <vstinner@redhat.com>
Mon, 23 Sep 2019 13:35:46 +0000 (15:35 +0200)
committerGitHub <noreply@github.com>
Mon, 23 Sep 2019 13:35:46 +0000 (15:35 +0200)
Add missing "return;" (to not dereference NULL pointer).

Python/initconfig.c

index cda4c863736c5c786d36cbeac9c30c4e12f60556..9f04e3d183ab4f00a6cdf8d7c037fbf14acf1342 100644 (file)
@@ -2547,6 +2547,7 @@ init_dump_ascii_wstr(const wchar_t *str)
 {
     if (str == NULL) {
         PySys_WriteStderr("(not set)");
+        return;
     }
 
     PySys_WriteStderr("'");