|
@@ -174,8 +174,10 @@ static size_t ServerNetworkLayerUDP_getJobs(ServerNetworkLayerUDP *layer, UA_Job
|
|
if (buf.length <= 0) {
|
|
if (buf.length <= 0) {
|
|
} else {
|
|
} else {
|
|
UDPConnection *c = malloc(sizeof(UDPConnection));
|
|
UDPConnection *c = malloc(sizeof(UDPConnection));
|
|
- if(!c)
|
|
|
|
|
|
+ if(!c){
|
|
|
|
+ free(items);
|
|
return UA_STATUSCODE_BADINTERNALERROR;
|
|
return UA_STATUSCODE_BADINTERNALERROR;
|
|
|
|
+ }
|
|
UA_Connection_init(&c->connection);
|
|
UA_Connection_init(&c->connection);
|
|
c->from = sender;
|
|
c->from = sender;
|
|
c->fromlen = sendsize;
|
|
c->fromlen = sendsize;
|