Fixed small bug in return value of record protobuf
This commit is contained in:
parent
897d257b3b
commit
d985919f41
2 changed files with 13 additions and 1 deletions
12
include/libp2p/record/message.h
Normal file
12
include/libp2p/record/message.h
Normal 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;
|
||||
|
||||
};
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue