On 03/26/2011 01:34 AM, ext Nicolas PENINGUY wrote:
On Fri, 2011-03-25 at 20:41 +0200, Tiago Vignatti wrote:
diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c
index 83ce930..b55e7f3 100644
--- a/Xi/xiproperty.c
+++ b/Xi/xiproperty.c
@@ -904,8 +904,8 @@ ProcXListDeviceProperties (ClientPtr client)
{
client->pSwapReplyFunc = (ReplySwapPtr)Swap32Write;
WriteSwappedDataToClient(client, natoms * sizeof(Atom), atoms);
- free(atoms);
}
+ free(atoms);
return rc;
}
I think it's wrong, because if natoms equals 0, list_atoms() doesn't
allocate anything and sets atoms to NULL.
@@ -1148,8 +1148,8 @@ ProcXIListProperties(ClientPtr client)
{
client->pSwapReplyFunc = (ReplySwapPtr)Swap32Write;
WriteSwappedDataToClient(client, natoms * sizeof(Atom), atoms);
- free(atoms);
}
+ free(atoms);
return rc;
}
Same here.
good point. Thank you for the review!
Tiago
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel