]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/cli/cli-setshow.c
Replace free() with xfree().
[thirdparty/binutils-gdb.git] / gdb / cli / cli-setshow.c
index eebcf5ee8ab5d74f69d8cb545e338aba084fd533..b6cbfed90f4338d76181718afe80c3686f39d518 100644 (file)
@@ -146,7 +146,7 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c)
            *q++ = '\0';
            new = (char *) xrealloc (new, q - new);
            if (*(char **) c->var != NULL)
-             free (*(char **) c->var);
+             xfree (*(char **) c->var);
            *(char **) c->var = new;
          }
          break;
@@ -154,14 +154,14 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c)
          if (arg == NULL)
            arg = "";
          if (*(char **) c->var != NULL)
-           free (*(char **) c->var);
+           xfree (*(char **) c->var);
          *(char **) c->var = savestring (arg, strlen (arg));
          break;
        case var_filename:
          if (arg == NULL)
            error_no_arg ("filename to set it to.");
          if (*(char **) c->var != NULL)
-           free (*(char **) c->var);
+           xfree (*(char **) c->var);
          *(char **) c->var = tilde_expand (arg);
          break;
        case var_boolean: