[Spice-devel] [PATCH] replay: use spice_malloc0 instead of raw malloc
Victor Toso
lists at victortoso.com
Fri Jan 15 02:02:43 PST 2016
Hi,
On Fri, Jan 15, 2016 at 09:51:58AM +0000, Frediano Ziglio wrote:
> 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 +-
It seems that there are other places that could use spice_malloc in
red-replay-qxl, no?
Patch looks good
Reviewed-by: Victor Toso <victortoso at redhat.com>
> 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 at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
More information about the Spice-devel
mailing list