libctf, bfd: fix ctf_bfdopen_ctfsect opening symbol and string sections
[deliverable/binutils-gdb.git] / libctf / ctf-lookup.c
index ab12715f4b1d557116ab4a5bc34178a453b3bf0d..40eaf9c819dcadcb36ab4570a646c3e81836d289 100644 (file)
@@ -1,4 +1,4 @@
-/* Type lookup.
+/* Symbol, variable and name lookup.
    Copyright (C) 2019 Free Software Foundation, Inc.
 
    This file is part of libctf.
@@ -153,7 +153,7 @@ ctf_lookup_by_name (ctf_file_t *fp, const char *name)
              else
                {
                  free (fp->ctf_tmp_typeslice);
-                 fp->ctf_tmp_typeslice = strndup (p, (size_t) (q - p));
+                 fp->ctf_tmp_typeslice = xstrndup (p, (size_t) (q - p));
                  if (fp->ctf_tmp_typeslice == NULL)
                    {
                      (void) ctf_set_errno (fp, ENOMEM);
This page took 0.027719 seconds and 4 git commands to generate.