]> Sergey Matveev's repositories - nnn.git/commitdiff
Fix memory leaks
authorlostd <lostd@2f30.org>
Wed, 8 Oct 2014 12:27:46 +0000 (15:27 +0300)
committerlostd <lostd@2f30.org>
Wed, 8 Oct 2014 12:27:46 +0000 (15:27 +0300)
noice.c

diff --git a/noice.c b/noice.c
index eed91895fec8fea7c31bb5d7f8a652687b2269f2..9c6aac58b378ccd91f4b2410be6f9d18f9510757 100644 (file)
--- a/noice.c
+++ b/noice.c
@@ -421,6 +421,7 @@ again:
                                bin = openwith(name);
                                if (bin == NULL) {
                                        printmsg("No association");
+                                       free(pathnew);
                                        goto nochange;
                                }
 
@@ -439,6 +440,7 @@ again:
                                goto redraw;
                        default:
                                printmsg("Unsupported file");
+                               free(pathnew);
                                goto nochange;
                        }
                }