* defs.h, utils.c (free_current_contents): Change parameter to
void*. From Philippe De Muyter <phdm@macqel.be>: * printcmd.c (print_address_symbolic): Call `make_cleanup' with `(free_current_contents, &x)', not `(free, x)'. * utils.c (free_current_contents): Do not `free (NULL)'. * printcmd.c (print_address_symbolic): Cleanup after a failed call to build_address_symbolic.
This commit is contained in:
parent
61c37cee5d
commit
2f9429aea3
4 changed files with 25 additions and 8 deletions
|
@ -375,10 +375,11 @@ restore_my_cleanups (pmy_chain, chain)
|
|||
to arrange to free the object thus allocated. */
|
||||
|
||||
void
|
||||
free_current_contents (location)
|
||||
char **location;
|
||||
free_current_contents (void *ptr)
|
||||
{
|
||||
free (*location);
|
||||
void **location = ptr;
|
||||
if (*location != NULL)
|
||||
free (*location);
|
||||
}
|
||||
|
||||
/* Provide a known function that does nothing, to use as a base for
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue