[maemo-commits] [maemo-commits] r16756 - projects/connectivity/osso-gwobex/trunk/src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Fri Nov 21 16:48:50 EET 2008
Author: jh
Date: 2008-11-21 16:48:49 +0200 (Fri, 21 Nov 2008)
New Revision: 16756

Modified:
   projects/connectivity/osso-gwobex/trunk/src/obex-priv.c
Log:
commit fda7b2d10e986597073c21113ce38bcb878595d0
Author: Vinicius Costa Gomes <vinicius.gomes at openbossa.org>
Date:   Tue Nov 18 16:36:23 2008 -0300

    Avoids a memory leak when a async operation gets aborted



Modified: projects/connectivity/osso-gwobex/trunk/src/obex-priv.c
===================================================================
--- projects/connectivity/osso-gwobex/trunk/src/obex-priv.c	2008-11-21 14:48:15 UTC (rev 16755)
+++ projects/connectivity/osso-gwobex/trunk/src/obex-priv.c	2008-11-21 14:48:49 UTC (rev 16756)
@@ -594,10 +594,11 @@
     }
     if (ctx->xfer) {
         /* Check that buffer is owned by us */
-        if (!(ctx->obex_op == OBEX_CMD_PUT && ctx->xfer->stream_fd < 0))
+        if (!(ctx->obex_op == OBEX_CMD_PUT && ctx->xfer->stream_fd < 0)) {
             g_free(ctx->xfer->buf);
-        ctx->xfer->buf = NULL;
-        ctx->xfer->buf_size = 0;
+            ctx->xfer->buf = NULL;
+            ctx->xfer->buf_size = 0;
+	}
 	ctx->xfer->do_cb = TRUE;
     }
 }


More information about the maemo-commits mailing list