]> granicus.if.org Git - python/commitdiff
zipimport: initialize fullpath to NULL
authorVictor Stinner <victor.stinner@haypocalc.com>
Thu, 26 May 2011 11:59:41 +0000 (13:59 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Thu, 26 May 2011 11:59:41 +0000 (13:59 +0200)
In some cases, fullpath value is used whereas fullpath was not always
initialized. Warning found by the Clang Static Analyzer.

Modules/zipimport.c

index de89a7699022acad5fffa0e4f0cc7c361d919809..a83bf8be13e598ed094ab6246b4dfceb228af400 100644 (file)
@@ -1196,7 +1196,7 @@ get_module_code(ZipImporter *self, PyObject *fullname,
                 int *p_ispackage, PyObject **p_modpath)
 {
     PyObject *code = NULL, *toc_entry, *subname;
-    PyObject *path, *fullpath;
+    PyObject *path, *fullpath = NULL;
     struct st_zip_searchorder *zso;
 
     subname = get_subname(fullname);