From patchwork Fri Jan 8 10:40:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 564711 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 7DB5D140157 for ; Fri, 8 Jan 2016 21:42:36 +1100 (AEDT) Received: from localhost ([::1]:34976 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHUV8-0000GN-H7 for incoming@patchwork.ozlabs.org; Fri, 08 Jan 2016 05:42:34 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49377) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHUT1-0004Hl-Hz for qemu-devel@nongnu.org; Fri, 08 Jan 2016 05:40:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHUSz-0000tt-Es for qemu-devel@nongnu.org; Fri, 08 Jan 2016 05:40:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44352) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHUSz-0000th-AL for qemu-devel@nongnu.org; Fri, 08 Jan 2016 05:40:21 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id E953BA8C for ; Fri, 8 Jan 2016 10:40:20 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-30.ams2.redhat.com [10.36.116.30]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u08AeKG4007104; Fri, 8 Jan 2016 05:40:20 -0500 Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id D43DD80E16; Fri, 8 Jan 2016 11:40:17 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 8 Jan 2016 11:40:13 +0100 Message-Id: <1452249615-8222-6-git-send-email-kraxel@redhat.com> In-Reply-To: <1452249615-8222-1-git-send-email-kraxel@redhat.com> References: <1452249615-8222-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Bandan Das , Gerd Hoffmann Subject: [Qemu-devel] [PULL 5/7] usb-mtp: fix call to trace function X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Bandan Das trace_usb_mtp_inotify_event() was being called after the object was being freed. Signed-off-by: Bandan Das Message-id: 1450861787-16213-3-git-send-email-bsd@redhat.com Signed-off-by: Gerd Hoffmann --- hw/usb/dev-mtp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index db1fd59..4177a87 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c @@ -502,9 +502,9 @@ static void inotify_watchfn(void *arg) entry = g_new0(MTPMonEntry, 1); entry->handle = o->handle; entry->event = EVT_OBJ_REMOVED; - usb_mtp_object_free(s, o); trace_usb_mtp_inotify_event(s->dev.addr, o->path, event->mask, "Obj Deleted"); + usb_mtp_object_free(s, o); break; case IN_MODIFY: