WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] free trans if allocated, if dev_request_and_reply fail.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] free trans if allocated, if dev_request_and_reply fail.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 09 Jan 2006 14:06:07 +0000
Delivery-date: Mon, 09 Jan 2006 14:12:34 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User vhanquez@xxxxxxxxxxxxxxxxxxxxxxx
# Node ID fbf58585008a9a8d4bec2d47ac64166c77d5bf7f
# Parent  96c7303b03ab570bff9df5944ca9ea35b63fdaf6
free trans if allocated, if dev_request_and_reply fail.

Signed-off-by: Vincent Hanquez <vincent@xxxxxxxxxxxxx>

diff -r 96c7303b03ab -r fbf58585008a 
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c      Mon Jan  9 
11:31:49 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c      Mon Jan  9 
13:11:55 2006
@@ -109,7 +109,7 @@
                                size_t len, loff_t *ppos)
 {
        struct xenbus_dev_data *u = filp->private_data;
-       struct xenbus_dev_transaction *trans;
+       struct xenbus_dev_transaction *trans = NULL;
        void *reply;
 
        if ((len + u->len) > sizeof(u->u.buffer))
@@ -141,8 +141,10 @@
                }
 
                reply = xenbus_dev_request_and_reply(&u->u.msg);
-               if (IS_ERR(reply))
+               if (IS_ERR(reply)) {
+                       kfree(trans);
                        return PTR_ERR(reply);
+               }
 
                if (u->u.msg.type == XS_TRANSACTION_START) {
                        trans->handle = (struct xenbus_transaction *)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] free trans if allocated, if dev_request_and_reply fail., Xen patchbot -unstable <=