Remove useless if() before free()

This commit is contained in:
Daniel P. Berrange 2012-01-31 15:22:46 +00:00
parent df1ae9f686
commit 48c50437fa
2 changed files with 6 additions and 10 deletions

View File

@ -235,8 +235,8 @@ NPP_Destroy(NPP instance, NPSavedData** save G_GNUC_UNUSED)
if (This != NULL)
{
(void) VirtViewerDestroyWindow (instance);
if (This->uri) free (This->uri);
if (This->name) free (This->name);
free (This->uri);
free (This->name);
NPN_MemFree(instance->pdata);
instance->pdata = NULL;
}

View File

@ -275,14 +275,10 @@ virt_viewer_extract_xpath_string(const gchar *xmldesc,
obj = NULL;
error:
if (obj)
xmlXPathFreeObject(obj);
if (ctxt)
xmlXPathFreeContext(ctxt);
if (xml)
xmlFreeDoc(xml);
if (pctxt)
xmlFreeParserCtxt(pctxt);
xmlXPathFreeObject(obj);
xmlXPathFreeContext(ctxt);
xmlFreeDoc(xml);
xmlFreeParserCtxt(pctxt);
return port;
}