[Mesa-dev] [PATCH 2/9] i965: check malloc return value in intel_resolve_map_set()
Kenneth Graunke
kenneth at whitecape.org
Thu Jul 3 14:29:28 PDT 2014
On Thursday, July 03, 2014 11:13:12 AM Juha-Pekka Heikkila wrote:
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
> ---
> src/mesa/drivers/dri/i965/intel_resolve_map.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_resolve_map.c
b/src/mesa/drivers/dri/i965/intel_resolve_map.c
> index bf6bcf2..bb45231 100644
> --- a/src/mesa/drivers/dri/i965/intel_resolve_map.c
> +++ b/src/mesa/drivers/dri/i965/intel_resolve_map.c
> @@ -22,6 +22,7 @@
> */
>
> #include "intel_resolve_map.h"
> +#include "main/imports.h"
>
> #include <assert.h>
> #include <stdlib.h>
> @@ -46,6 +47,11 @@ intel_resolve_map_set(struct exec_list *resolve_map,
> }
>
> struct intel_resolve_map *m = malloc(sizeof(struct intel_resolve_map));
> + if (m == NULL) {
> + _mesa_error_no_memory(__func__);
> + return;
> + }
> +
> exec_node_init(&m->link);
> m->level = level;
> m->layer = layer;
>
NAK.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140703/d93e9051/attachment.sig>
More information about the mesa-dev
mailing list