mirror of https://bitbucket.org/ausocean/av.git
codec/h264/h264dec/fuzz/helpers.c: checking if r or br == NULL
This commit is contained in:
parent
b418749be5
commit
fb020df877
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue