* [PATCH] v4l-utils/libdvbv5: fix memory leak in dvb_guess_user_country()
@ 2014-11-02 12:03 tskd08
0 siblings, 0 replies; only message in thread
From: tskd08 @ 2014-11-02 12:03 UTC (permalink / raw)
To: linux-media; +Cc: m.chehab, Akihiro Tsukada
From: Akihiro Tsukada <tskd08@gmail.com>
Signed-off-by: Akihiro Tsukada <tskd08@gmail.com>
---
lib/libdvbv5/countries.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/libdvbv5/countries.c b/lib/libdvbv5/countries.c
index 7acdcc7..9e68ea6 100644
--- a/lib/libdvbv5/countries.c
+++ b/lib/libdvbv5/countries.c
@@ -395,13 +395,13 @@ enum dvb_country_t dvb_guess_user_country(void)
if (! buf || strlen(buf) < 2)
continue;
- buf = strdup(buf);
- pbuf= buf;
-
if (! strncmp(buf, "POSIX", MIN(strlen(buf), 5)) ||
! (strncmp(buf, "en", MIN(strlen(buf), 2)) && !isalpha(buf[2])) )
continue;
+ buf = strdup(buf);
+ pbuf= buf;
+
// assuming 'language_country.encoding@variant'
// country after '_', if given
--
2.1.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-11-02 12:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-02 12:03 [PATCH] v4l-utils/libdvbv5: fix memory leak in dvb_guess_user_country() tskd08
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.