Files
xen/tools/libxl
Ian Campbell e5b16dba2e tools: libxl: make it illegal to pass libxl__realloc(gc) a non-gc ptr
That is, if gc is not NOGC and ptr is not NULL then ptr must be
associated with a gc.

Currently in this case the new_ptr would not be registered with any
gc, which Coverity rightly points out (in various different places)
would be a memory leak.

It would also be possible to fix this by adding a libxl__ptr_add() at
the same point, however semantically it seems like a programming error
to gc-realloc a pointer which is not associated with the gc in
question, so treat it as such.

Compile tested only, this change could expose latent bugs.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2016-02-11 15:36:19 +00:00
..
2013-10-10 15:48:55 +01:00
2012-10-05 14:34:30 +01:00
2014-07-10 13:06:55 +01:00
2015-07-07 15:50:12 +01:00
2013-10-10 15:48:55 +01:00
2011-10-12 16:21:32 +01:00
2015-01-19 15:32:17 +00:00
2015-01-27 16:34:05 +00:00