mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-13 18:32:56 +00:00
check char *h for NULL in r_file_new (#19183)
This commit is contained in:
parent
9d84785d62
commit
0840a34410
@ -57,6 +57,11 @@ R_API char *r_file_new(const char *root, ...) {
|
||||
RStrBuf *sb = r_strbuf_new ("");
|
||||
if (!strcmp (root, "~")) {
|
||||
char *h = r_str_home (NULL);
|
||||
if (!h) {
|
||||
va_end (ap);
|
||||
r_strbuf_free (sb);
|
||||
return NULL;
|
||||
}
|
||||
r_strbuf_append (sb, h);
|
||||
free (h);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user