Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libperfuse Fix invalid free in deletextattr FUSE handler



details:   https://anonhg.NetBSD.org/src/rev/fe484f931533
branches:  trunk
changeset: 333300:fe484f931533
user:      manu <manu%NetBSD.org@localhost>
date:      Tue Oct 28 16:54:11 2014 +0000

description:
Fix invalid free in deletextattr FUSE handler

Do not free FUSE message on error as it was not allocated.

diffstat:

 lib/libperfuse/ops.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (22 lines):

diff -r d2d02e206e13 -r fe484f931533 lib/libperfuse/ops.c
--- a/lib/libperfuse/ops.c      Tue Oct 28 13:04:51 2014 +0000
+++ b/lib/libperfuse/ops.c      Tue Oct 28 16:54:11 2014 +0000
@@ -1,4 +1,4 @@
-/*  $NetBSD: ops.c,v 1.76 2014/10/11 04:19:38 manu Exp $ */
+/*  $NetBSD: ops.c,v 1.77 2014/10/28 16:54:11 manu Exp $ */
 
 /*-
  *  Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved.
@@ -3633,9 +3633,11 @@
        (void)strlcpy(np, attrname, attrnamelen);
        
        error = xchg_msg(pu, opc, pm, NO_PAYLOAD_REPLY_LEN, wait_reply);
+       if (error != 0)
+               goto out;
        
        ps->ps_destroy_msg(pm);
-
+out:
        node_rele(opc);
        return error;
 }



Home | Main Index | Thread Index | Old Index