Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
paho.mqtt.c
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eclipse
paho.mqtt.c
Commits
0ca079ab
Unverified
Commit
0ca079ab
authored
Jun 04, 2018
by
Ian Craggs
Committed by
GitHub
Jun 04, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #478 from lt-holman/segfault_fix
prevent segfault for unknown protocol in test app
parents
8a0daa17
9bd6c09d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
MQTTClient.c
src/MQTTClient.c
+8
-1
No files found.
src/MQTTClient.c
View file @
0ca079ab
...
@@ -1319,7 +1319,14 @@ int MQTTClient_connect(MQTTClient handle, MQTTClient_connectOptions* options)
...
@@ -1319,7 +1319,14 @@ int MQTTClient_connect(MQTTClient handle, MQTTClient_connectOptions* options)
}
}
if
(
options
->
struct_version
<
2
||
options
->
serverURIcount
==
0
)
if
(
options
->
struct_version
<
2
||
options
->
serverURIcount
==
0
)
{
if
(
!
m
)
{
rc
=
MQTTCLIENT_NULL_PARAMETER
;
goto
exit
;
}
rc
=
MQTTClient_connectURI
(
handle
,
options
,
m
->
serverURI
);
rc
=
MQTTClient_connectURI
(
handle
,
options
,
m
->
serverURI
);
}
else
else
{
{
int
i
;
int
i
;
...
@@ -1354,7 +1361,7 @@ int MQTTClient_connect(MQTTClient handle, MQTTClient_connectOptions* options)
...
@@ -1354,7 +1361,7 @@ int MQTTClient_connect(MQTTClient handle, MQTTClient_connectOptions* options)
}
}
exit:
exit:
if
(
m
->
c
->
will
)
if
(
m
&&
m
->
c
&&
m
->
c
->
will
)
{
{
if
(
m
->
c
->
will
->
payload
)
if
(
m
->
c
->
will
->
payload
)
free
(
m
->
c
->
will
->
payload
);
free
(
m
->
c
->
will
->
payload
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment