Skip to content

Commit

Permalink
extcap: Avoid double free of help.
Browse files Browse the repository at this point in the history
Avoid double free of help when having multiple extcap interfaces.

Ping-Bug: 13218
Change-Id: I6a0d6afd645787f9814c02e84079b4e8763d05f1
Reviewed-on: https://code.wireshark.org/review/19261
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
  • Loading branch information
stigbjorlykke authored and crondaemon committed Dec 14, 2016
1 parent 978a30b commit 07ffcf9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extcap.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ static gboolean interfaces_cb(const gchar *extcap, const gchar *ifname _U_, gcha
else if (int_iter->if_type == EXTCAP_SENTENCE_EXTCAP)
{
g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_DEBUG, " Extcap [%s] ", int_iter->call);
help = g_strdup(int_iter->help);
help = int_iter->help;
}

if (int_iter->if_type == EXTCAP_SENTENCE_INTERFACE)
Expand All @@ -403,7 +403,7 @@ static gboolean interfaces_cb(const gchar *extcap, const gchar *ifname _U_, gcha
}

int_iter->extcap_path = g_strdup(extcap);
int_iter->help = help;
int_iter->help = g_strdup(help);
preserve_interface = extcap_if_add(int_iter);
}

Expand Down

0 comments on commit 07ffcf9

Please sign in to comment.