Diff between 5d7835ea904b08a3f3f1dccaeae70f38622e9744 and 14d11b28e496de5c7bcef0f9f352387173c87bde

Changed Files

File Additions Deletions Status
obexd/plugins/pbap.c +4 -1 modified

Full Patch

diff --git a/obexd/plugins/pbap.c b/obexd/plugins/pbap.c
index 7422a1e..c008e95 100644
--- a/obexd/plugins/pbap.c
+++ b/obexd/plugins/pbap.c
@@ -555,7 +555,7 @@ static int pbap_get(struct obex_session *os, obex_object_t *obj,
 
 	DBG("name %s type %s pbap %p", name, type, pbap);
 
-	if (type == NULL || name == NULL)
+	if (type == NULL)
 		return -EBADR;
 
 	rsize = obex_aparam_read(os, obj, &buffer);
@@ -594,6 +594,9 @@ static int pbap_get(struct obex_session *os, obex_object_t *obj,
 	} else
 		return -EBADR;
 
+	if (path == NULL)
+		return -EBADR;
+
 	pbap->params = params;
 	ret = obex_get_stream_start(os, path);