compositor-rdp: free() can handle NULL pointers

There's no need to check if a pointer exists before passing it to free().
free() can handle NULL pointers.

Signed-off-by: Dawid Gajownik <gajownik@gmail.com>
Reviewed-By: David FORT <contact@hardening-consulting.com>
dev
Dawid Gajownik 10 years ago committed by Bryce Harrington
parent 71f5704879
commit f965db5fc1
  1. 3
      src/compositor-rdp.c

@ -1233,11 +1233,8 @@ err_output:
err_compositor:
weston_compositor_shutdown(compositor);
err_free_strings:
if (b->rdp_key)
free(b->rdp_key);
if (b->server_cert)
free(b->server_cert);
if (b->server_key)
free(b->server_key);
free(b);
return NULL;

Loading…
Cancel
Save