]> granicus.if.org Git - python/commitdiff
Now all error paths of _freeze_importlib use 'goto error' and the error label cleans...
authorChristian Heimes <christian@cheimes.de>
Sun, 21 Jul 2013 21:05:11 +0000 (23:05 +0200)
committerChristian Heimes <christian@cheimes.de>
Sun, 21 Jul 2013 21:05:11 +0000 (23:05 +0200)
1  2 
Modules/_freeze_importlib.c

index 75013e1ef0dce7829279aac7e9b080c463af764f,8f07a89a8af73e82dc06d12e02ae51c75306b04e..57b1ac06624b53683ca49e22390eaa6724ce2547
@@@ -104,11 -103,10 +103,10 @@@ main(int argc, char *argv[]
      outfile = fopen(outpath, "w");
      if (outfile == NULL) {
          fprintf(stderr, "cannot open '%s' for writing\n", outpath);
-         Py_DECREF(marshalled);
-         return 1;
+         goto error;
      }
      fprintf(outfile, "%s\n", header);
 -    fprintf(outfile, "unsigned char _Py_M__importlib[] = {\n");
 +    fprintf(outfile, "const unsigned char _Py_M__importlib[] = {\n");
      for (n = 0; n < data_size; n += 16) {
          size_t i, end = Py_MIN(n + 16, data_size);
          fprintf(outfile, "    ");