checkpolicy: dereference rangehead after checking it was not NULL

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
This commit is contained in:
Nicolas Iooss 2017-03-17 23:10:03 +01:00 committed by James Carter
parent 6707526f1f
commit 9087bb9c5a

View file

@ -1924,11 +1924,11 @@ int avrule_ioctl_ranges(struct av_ioctl_range_list **rangelist)
/* read in ranges to include and omit */
if (avrule_read_ioctls(&rangehead))
return -1;
omit = rangehead->omit;
if (rangehead == NULL) {
yyerror("error processing ioctl commands");
return -1;
}
omit = rangehead->omit;
/* sort and merge the input ioctls */
if (avrule_sort_ioctls(&rangehead))
return -1;