Reported-by: Marc Hörsken
Reviewed-by: Jay Satiro
Bug: #6058
Closes #6189
size_t bytes = 0; /* remaining length field size in bytes */
char client_id[MAX_CLIENT_ID_LENGTH];
long testno;
+ FILE *stream = NULL;
static const char protocol[7] = {
0x00, 0x04, /* protocol length */
}
}
else if(byte == MQTT_MSG_SUBSCRIBE) {
- FILE *stream;
int error;
char *data;
size_t datalen;
} while(1);
end:
- fclose(dump);
+ if(dump)
+ fclose(dump);
+ if(stream)
+ fclose(stream);
return CURL_SOCKET_BAD;
}