From: lteo Date: Tue, 28 Apr 2015 02:26:43 +0000 (+0000) Subject: Add a missing free in the error path. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f1b99c2bce5249920a8c0be62bb8e6728aef3a9a;p=openbsd Add a missing free in the error path. ok nicm@ --- diff --git a/usr.bin/file/file.c b/usr.bin/file/file.c index 7f7cabe5f4e..0c2707d9d8e 100644 --- a/usr.bin/file/file.c +++ b/usr.bin/file/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.36 2015/04/27 13:52:17 nicm Exp $ */ +/* $OpenBSD: file.c,v 1.37 2015/04/28 02:26:43 lteo Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott @@ -301,6 +301,7 @@ read_link(struct input_msg *msg, const char *path) "%s/%s", root, lpath); if (used < 0 || (size_t)used >= sizeof msg->link_path) { msg->link_error = ENAMETOOLONG; + free(copy); return; } }