mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-19 05:07:56 +00:00
fixed manifest structure leak when failing to write a manifest.
This commit is contained in:
parent
322806a150
commit
3164a76b1e
@ -521,6 +521,7 @@ int rhizome_fetch_poll()
|
||||
char filename[1024];
|
||||
if (!FORM_RHIZOME_DATASTORE_PATH(filename,"import/manifest.%s", id))
|
||||
return -1;
|
||||
snprintf(filename,1024,"%s/manifest.%s",rhizome_datastore_path(),id);
|
||||
/* Do really write the manifest unchanged */
|
||||
if (debug&DEBUG_RHIZOME) {
|
||||
fprintf(stderr,"manifest has %d signatories\n",q->manifest->sig_count);
|
||||
@ -540,6 +541,10 @@ int rhizome_fetch_poll()
|
||||
1 /* do check hash of file */,
|
||||
0 /* do not sign it, just keep existing signatures */);
|
||||
q->manifest=NULL;
|
||||
} else {
|
||||
WHY("rhizome_write_manifest_file() failed");
|
||||
rhizome_manifest_free(q->manifest);
|
||||
q->manifest=NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user