rt-tests: deadline_test: Add NULL check before freeing setcpu_buf

setcpu_buf doesn't always call malloc, so NULL check it before freeing

Signed-off-by: John Kacur <jkacur@redhat.com>
This commit is contained in:
John Kacur 2018-11-15 13:00:06 +01:00
parent 7ea837b01d
commit ed58e7ad03
1 changed files with 3 additions and 1 deletions

View File

@ -2092,6 +2092,8 @@ int main (int argc, char **argv)
printf("\n");
}
free(setcpu_buf);
if (!setcpu_buf)
free(setcpu_buf);
return 0;
}