From 0f498d250417892fc629d95df085c04e5489fd17 Mon Sep 17 00:00:00 2001 From: jsg Date: Sat, 23 May 2015 14:26:06 +0000 Subject: [PATCH] fix a memory leak in an error path --- usr.sbin/ldomctl/mdesc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/ldomctl/mdesc.c b/usr.sbin/ldomctl/mdesc.c index bba7d9c70ca..babdd821641 100644 --- a/usr.sbin/ldomctl/mdesc.c +++ b/usr.sbin/ldomctl/mdesc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mdesc.c,v 1.8 2015/02/09 04:27:25 jsg Exp $ */ +/* $OpenBSD: mdesc.c,v 1.9 2015/05/23 14:26:06 jsg Exp $ */ /* * Copyright (c) 2012 Mark Kettenis @@ -622,6 +622,7 @@ md_read(const char *path) buf = xmalloc(size); if (fread(buf, size, 1, fp) != 1) { fclose(fp); + free(buf); return NULL; } -- 2.20.1