mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Remove more useless if tests before "free"-like functions.
* build-aux/useless-if-before-free: Rename from ... * build-aux/find-unnecessary-if-before-free: ... this. Remove file. Also changed it so that new names are no longer hard-coded in the script. Instead, they're supplied via options: * Makefile.cfg (useless_free_options): Define. Add xmlXPathFreeObject to the list of free-like functions it detects. * Makefile.maint (sc_avoid_if_before_free): Reflect script renaming. * .x-sc_avoid_if_before_free: Likewise. * src/openvz_conf.c (openvzParseXML): Remove useless "if"-before-free. * src/qemu_conf.c (qemudParseXML, qemudParseNetworkXML): Likewise. * src/virsh.c (cmdVNCDisplay, cmdTTYConsole, cmdDetachInterface): (cmdDetachDisk): Likewise. * src/xm_internal.c (xenXMConfigSetIntFromXPath): Likewise. (xenXMConfigSetStringFromXPath, xenXMParseXMLToConfig): Likewise. (xenXMDomainAttachDevice, xenXMAttachDisk, xenXMAttachInterface): (xenXMDomainDetachDevice): Likewise. * src/xml.c (virXPathString): Likewise. * tests/xmlrpctest.c (checkRequestValue): Likewise.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* xmlrpctest.c: simple client for XML-RPC tests
|
||||
*
|
||||
* Copyright (C) 2005 Red Hat, Inc.
|
||||
* Copyright (C) 2005, 2008 Red Hat, Inc.
|
||||
*
|
||||
* See COPYING.LIB for the License of this software
|
||||
*
|
||||
@@ -119,8 +119,7 @@ checkRequestValue(const char *xmlstr, const char *xpath, int type, void *expecte
|
||||
ret = 0;
|
||||
|
||||
error:
|
||||
if (obj)
|
||||
xmlXPathFreeObject(obj);
|
||||
xmlXPathFreeObject(obj);
|
||||
xmlXPathFreeContext(ctxt);
|
||||
if (xml)
|
||||
xmlFreeDoc(xml);
|
||||
|
||||
Reference in New Issue
Block a user