mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-05 04:10:28 +01:00
lldp: fix calling free on memory returned by systemd
systemd's malloc() must be matched by free() and not g_free(). Thereby, use a cleanup attribute.
This commit is contained in:
parent
bd797e9fe1
commit
a3f9115c0b
1 changed files with 1 additions and 3 deletions
|
|
@ -226,7 +226,7 @@ static void
|
|||
process_lldp_neighbors (NMLldpListener *self)
|
||||
{
|
||||
NMLldpListenerPrivate *priv = NM_LLDP_LISTENER_GET_PRIVATE (self);
|
||||
sd_lldp_packet **packets = NULL;
|
||||
nm_auto_free sd_lldp_packet **packets = NULL;
|
||||
GHashTable *hash;
|
||||
int num, i;
|
||||
|
||||
|
|
@ -353,8 +353,6 @@ next_packet:
|
|||
sd_lldp_packet_unref (packets[i]);
|
||||
}
|
||||
|
||||
g_free (packets);
|
||||
|
||||
if (lldp_hash_table_equal (priv->lldp_neighbors, hash)) {
|
||||
g_hash_table_destroy (hash);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue