syntax-check: fix cast_of_argument_to_free

In this case, make syntax-check is wrong, and we actually do
need the cast.
A cast is needed when types are   uint64_t <--> pointer

Using a local "ptr" variable makes both gcc and syntax-check happy.
This commit is contained in:
Uri Lublin 2013-07-09 23:24:31 +03:00
parent a89b1b5543
commit 413883ecf8

View File

@ -42,7 +42,8 @@ static void test_spice_destroy_update(SimpleSpiceUpdate *update)
return;
}
if (update->drawable.clip.type != SPICE_CLIP_TYPE_NONE) {
free((uint8_t*)update->drawable.clip.data);
uint8_t *ptr = (uint8_t*)update->drawable.clip.data;
free(ptr);
}
free(update->bitmap);
free(update);