This function report memory allocation errors and reset memory after allocation. Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx> --- server/red-replay-qxl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/red-replay-qxl.c b/server/red-replay-qxl.c index 8e0b28c..fb7b9b7 100644 --- a/server/red-replay-qxl.c +++ b/server/red-replay-qxl.c @@ -1215,7 +1215,7 @@ SpiceReplay *spice_replay_new(FILE *file, int nsurfaces) } } - replay = malloc(sizeof(SpiceReplay)); + replay = spice_malloc0(sizeof(SpiceReplay)); replay->eof = 0; replay->fd = file; -- 2.4.3 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel