Fixed small bug in return value of record protobuf

yamux
John Jones 2017-02-16 20:59:59 -05:00
parent 897d257b3b
commit d985919f41
2 changed files with 13 additions and 1 deletions

View File

@ -0,0 +1,12 @@
#pragma once
/**
* protobuf stuff for Message and Peer
* This is used for the KAD / DHT stuff
*/
struct Libp2pPeer {
char* id;
size_t id_size;
};

View File

@ -199,7 +199,7 @@ int libp2p_record_make_put_record (char** record_buf, size_t *rec_size, const st
free(bytes);
if (sign_buf != NULL)
free(sign_buf);
if (retVal == 0) {
if (retVal = -1) {
free(*record_buf);
*record_buf = NULL;
}