summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2013-01-05 15:30:51 +0100
committerDavid Sommerseth <dazo@users.sourceforge.net>2013-06-07 23:34:11 +0200
commitd7b486079a77beb883e3c5e39842dd5c180f3b7b (patch)
treec12b879d840352a05b1da48ab6801b7c1eb92bf2
parente2bcae3f289d444a775b80d00d073fd37fcb2140 (diff)
downloadeurephia-d7b486079a77beb883e3c5e39842dd5c180f3b7b.tar.gz
eurephia-d7b486079a77beb883e3c5e39842dd5c180f3b7b.tar.xz
eurephia-d7b486079a77beb883e3c5e39842dd5c180f3b7b.zip
Fixed a memory leak in detect_tunnel_type()
If the tunnel type was detected and a understandable device name was found, the local devtype was not freed at all. Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
-rw-r--r--plugin/eurephia-auth.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugin/eurephia-auth.c b/plugin/eurephia-auth.c
index dfe8ff2..c93df1d 100644
--- a/plugin/eurephia-auth.c
+++ b/plugin/eurephia-auth.c
@@ -158,6 +158,7 @@ static inline int detect_tunnel_type(eurephiaCTX *ctx, const char const *env[])
tuntype = conv_str2tuntype(devtype);
if( tuntype != tuntype_UNKN ) {
ctx->tuntype = tuntype;
+ free_nullsafe(ctx, devtype);
goto success;
}
free_nullsafe(ctx, devtype);