patch: fix double-free (bug 1120)
authorDenis Vlasenko <vda.linux@googlemail.com>
Sun, 17 Dec 2006 00:33:29 +0000 (00:33 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Sun, 17 Dec 2006 00:33:29 +0000 (00:33 -0000)
editors/patch.c

index 8e885d06e29a49253ed4286636cf1b4d975b5562..d13b06a8380eded400bd7f2fa969f3c6d13b0f25 100644 (file)
@@ -214,6 +214,7 @@ int patch_main(int argc, char **argv)
                                                        bb_error_msg("hunk #%d FAILED at %d", hunk_count, hunk_offset_start);
                                                        hunk_error++;
                                                        free(patch_line);
+                                                       patch_line = NULL;
                                                        break;
                                                }
                                                free(src_line);