diff options
Diffstat (limited to 'libctf/ctf-string.c')
-rw-r--r-- | libctf/ctf-string.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libctf/ctf-string.c b/libctf/ctf-string.c index 911e947..594b243 100644 --- a/libctf/ctf-string.c +++ b/libctf/ctf-string.c @@ -170,8 +170,10 @@ ctf_str_add_ref_internal (ctf_dict_t *fp, const char *str, if (flags & CTF_STR_ADD_REF) { - if ((aref = malloc (sizeof (struct ctf_str_atom_ref))) == NULL) + if ((aref = malloc (sizeof (struct ctf_str_atom_ref))) == NULL) { + ctf_set_errno (fp, ENOMEM); return NULL; + } aref->caf_ref = ref; } |