mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-15 00:13:28 +00:00
Remove more superfluous if(p) checks around free(p)
This patch has been generated by the following Coccinelle semantic patch:
@@
expression E;
@@
-if(E) { free(E); }
+free(E);
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
parent
5a0fc0ad21
commit
0a4d8cbdcd
84 changed files with 240 additions and 412 deletions
|
|
@ -259,8 +259,7 @@ ProcXvMCCreateContext(ClientPtr client)
|
|||
WriteToClient(client, dwords << 2, (char*)data);
|
||||
AddResource(pContext->context_id, XvMCRTContext, pContext);
|
||||
|
||||
if(data)
|
||||
free(data);
|
||||
free(data);
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
|
@ -327,8 +326,7 @@ ProcXvMCCreateSurface(ClientPtr client)
|
|||
WriteToClient(client, dwords << 2, (char*)data);
|
||||
AddResource(pSurface->surface_id, XvMCRTSurface, pSurface);
|
||||
|
||||
if(data)
|
||||
free(data);
|
||||
free(data);
|
||||
|
||||
pContext->refcnt++;
|
||||
|
||||
|
|
@ -444,8 +442,7 @@ ProcXvMCCreateSubpicture(ClientPtr client)
|
|||
WriteToClient(client, dwords << 2, (char*)data);
|
||||
AddResource(pSubpicture->subpicture_id, XvMCRTSubpicture, pSubpicture);
|
||||
|
||||
if(data)
|
||||
free(data);
|
||||
free(data);
|
||||
|
||||
pContext->refcnt++;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue