[Spice-devel] [PATCH] replay: use spice_malloc0 instead of raw malloc
Frediano Ziglio
fziglio at redhat.com
Fri Jan 15 01:51:58 PST 2016
This function report memory allocation errors and reset memory
after allocation.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
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
More information about the Spice-devel
mailing list