diff options
Diffstat (limited to 'libfshelp')
-rw-r--r-- | libfshelp/translator-list.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libfshelp/translator-list.c b/libfshelp/translator-list.c index c730ecd1..52031286 100644 --- a/libfshelp/translator-list.c +++ b/libfshelp/translator-list.c @@ -89,6 +89,10 @@ fshelp_set_active_translator (struct port_info *pi, if (t) goto update; /* Entry exists. */ + if (! MACH_PORT_VALID (active)) + /* Avoid allocating an entry just to delete it. */ + goto out; + t = malloc (sizeof *t); if (! t) { |