[PATCH libICE 09/13] add check for malloc

Emil Velikov emil.l.velikov at gmail.com
Tue Oct 31 14:10:29 UTC 2017


On 18 October 2017 at 17:03, walter harms <wharms at bfs.de> wrote:
>
>
> fix a potential null pointer deference error
>
> Signed-off-by: Walter Harms <wharms at bfs.de>
>
> ---
>  src/replywait.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/replywait.c b/src/replywait.c
> index b25c351..91a8dd6 100644
> --- a/src/replywait.c
> +++ b/src/replywait.c
> @@ -60,7 +60,8 @@ _IceAddReplyWait (
>      }
>
>      savedReplyWait = malloc (sizeof (_IceSavedReplyWait));
> -
> +    if (!savedReplyWait)
> +      return;
Nit: Please keep a blank line after the if statement.

-Emil


More information about the xorg-devel mailing list