mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-30 01:44:50 +00:00
Fix CID 1134850
This commit is contained in:
parent
2d15ed9523
commit
14fb1b2b6a
@ -154,8 +154,10 @@ static RIODesc *__open(RIO *io, const char *pathname, int rw, int mode) {
|
||||
mal->fd = getmalfd (mal);
|
||||
mal->bfvm = bfvm_new (&iob);
|
||||
out = r_file_slurp (pathname+8, &rlen);
|
||||
if (!out || rlen<1)
|
||||
if (!out || rlen < 1) {
|
||||
free (out);
|
||||
return NULL;
|
||||
}
|
||||
mal->size = rlen;
|
||||
mal->buf = malloc (mal->size+1);
|
||||
if (mal->buf != NULL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user