Signed-off-by: Yousong Zhou <[email protected]>
---
 libbb/xreadlink.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libbb/xreadlink.c b/libbb/xreadlink.c
index 596a763..29949d1 100644
--- a/libbb/xreadlink.c
+++ b/libbb/xreadlink.c
@@ -25,6 +25,7 @@ extern char *xreadlink(const char *path)
                readsize = readlink(path, buf, bufsize);        /* 1st try */
                if (readsize == -1) {
                        perror_msg("%s", path);
+                       free(buf);
                        return NULL;
                }
        }
-- 
2.6.4


_______________________________________________
Lede-dev mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/lede-dev

Reply via email to