tools: fix some missing free/close

This commit is contained in:
Pauli Virtanen 2025-06-14 15:21:29 +03:00
parent 3539374ba7
commit baadda3b67
2 changed files with 2 additions and 2 deletions

View file

@ -1559,7 +1559,7 @@ static struct global *
obj_global_port(struct remote_data *rd, struct global *global, const char *port_direction, const char *port_id) obj_global_port(struct remote_data *rd, struct global *global, const char *port_direction, const char *port_id)
{ {
struct global *global_port_found = NULL; struct global *global_port_found = NULL;
uint32_t *ports = NULL; spa_autofree uint32_t *ports = NULL;
int port_count; int port_count;
port_count = children_of(rd, global->id, PW_TYPE_INTERFACE_Port, &ports); port_count = children_of(rd, global->id, PW_TYPE_INTERFACE_Port, &ports);
@ -1582,7 +1582,6 @@ obj_global_port(struct remote_data *rd, struct global *global, const char *port_
} }
} }
free(ports);
return global_port_found; return global_port_found;
} }

View file

@ -395,6 +395,7 @@ rd_device_new(DBusConnection *connection, const char *device_name, const char *a
error_free: error_free:
free(d->service_name); free(d->service_name);
free(d->object_path); free(d->object_path);
free(d->application_name);
free(d); free(d);
errno = -res; errno = -res;
return NULL; return NULL;