codec/h264/h264dec/fuzz/helpers.c: checking if r or br == NULL

This commit is contained in:
Saxon 2020-01-29 10:26:24 +10:30
parent b418749be5
commit fb020df877
1 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ typedef struct Reader Reader;
BitReader* new_BitReader(char* d, int l){ BitReader* new_BitReader(char* d, int l){
Reader* r = (Reader*)malloc(sizeof(Reader)); Reader* r = (Reader*)malloc(sizeof(Reader));
if(!r){ if(r == NULL){
return NULL; return NULL;
} }
r->data = d; r->data = d;
@ -39,7 +39,7 @@ BitReader* new_BitReader(char* d, int l){
r->err = 0; r->err = 0;
BitReader* br = (BitReader*)malloc(sizeof(BitReader)); BitReader* br = (BitReader*)malloc(sizeof(BitReader));
if(!br){ if(br == NULL){
return NULL; return NULL;
} }
br->r = r; br->r = r;