/pidgin/main: 94b23a04da62: facebook: fixed a few issues reporte...

James Geboski jgeboski at gmail.com
Mon Dec 28 16:51:19 EST 2015


Changeset: 94b23a04da62ebedaecb6fe5a65443e49f165b35
Author:	 James Geboski <jgeboski at gmail.com>
Date:	 2015-12-28 16:51 -0500
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/94b23a04da62

Description:

facebook: fixed a few issues reported by Coverity

diffstat:

 libpurple/protocols/facebook/http.c |  4 ++--
 libpurple/protocols/facebook/mqtt.c |  1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diffs (28 lines):

diff --git a/libpurple/protocols/facebook/http.c b/libpurple/protocols/facebook/http.c
--- a/libpurple/protocols/facebook/http.c
+++ b/libpurple/protocols/facebook/http.c
@@ -152,11 +152,11 @@ fb_http_params_new_parse(const gchar *da
 	if (isurl) {
 		data = strchr(data, '?');
 
-		if (data++ == NULL) {
+		if (data == NULL) {
 			return params;
 		}
 
-		tail = strchr(data, '#');
+		tail = strchr(++data, '#');
 
 		if (tail != NULL) {
 			data = g_strndup(data, tail - data);
diff --git a/libpurple/protocols/facebook/mqtt.c b/libpurple/protocols/facebook/mqtt.c
--- a/libpurple/protocols/facebook/mqtt.c
+++ b/libpurple/protocols/facebook/mqtt.c
@@ -469,6 +469,7 @@ fb_mqtt_read(FbMqtt *mqtt, FbMqttMessage
 			}
 
 			if (!fb_mqtt_message_read_mid(msg, &mid)) {
+				g_free(str);
 				break;
 			}
 



More information about the Commits mailing list