From patchwork Wed Apr 27 22:34:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 66845 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp2444875qge; Wed, 27 Apr 2016 15:36:54 -0700 (PDT) X-Received: by 10.194.37.106 with SMTP id x10mr11676811wjj.135.1461796614218; Wed, 27 Apr 2016 15:36:54 -0700 (PDT) Return-Path: Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com. [209.132.183.24]) by mx.google.com with ESMTPS id e2si21361682wme.34.2016.04.27.15.36.53 (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 27 Apr 2016 15:36:54 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.24 as permitted sender) client-ip=209.132.183.24; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.24 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u3RMYCVW022664; Wed, 27 Apr 2016 18:34:13 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u3RMYAdv031659 for ; Wed, 27 Apr 2016 18:34:10 -0400 Received: from colepc.redhat.com (ovpn-113-44.phx2.redhat.com [10.3.113.44]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3RMY8of021727; Wed, 27 Apr 2016 18:34:10 -0400 From: Cole Robinson To: libvirt-list@redhat.com Date: Wed, 27 Apr 2016 18:34:00 -0400 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/4] rpc: Clear more in virNetMessageClearPayload X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com Set all counters to 0. This doesn't impact current users, but future users will want this --- src/rpc/virnetmessage.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/src/rpc/virnetmessage.c b/src/rpc/virnetmessage.c index 3df502a..673fb8d 100644 --- a/src/rpc/virnetmessage.c +++ b/src/rpc/virnetmessage.c @@ -56,7 +56,13 @@ virNetMessageClearPayload(virNetMessagePtr msg) for (i = 0; i < msg->nfds; i++) VIR_FORCE_CLOSE(msg->fds[i]); + + msg->donefds = 0; + msg->nfds = 0; VIR_FREE(msg->fds); + + msg->bufferOffset = 0; + msg->bufferLength = 0; VIR_FREE(msg->buffer); }