Commit a3f9115c authored by Thomas Haller's avatar Thomas Haller

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.
parent bd797e9f
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment