File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -551,4 +551,6 @@ EXPORT void cleanup_metafile(struct metafile *m)
551
551
ll_free (m -> file_list , file_data_clear );
552
552
553
553
ll_free (m -> web_seed_list , NULL );
554
+
555
+ free (m -> metainfo_file_path );
554
556
}
Original file line number Diff line number Diff line change @@ -138,14 +138,18 @@ int main(int argc, char *argv[])
138
138
_after_ we did all the hashing in case we fail */
139
139
file = open_file (m .metainfo_file_path );
140
140
141
- /* calculate hash string and write the metainfo to file */
142
- write_metainfo ( file , & m , make_hash (& m ) );
141
+ /* calculate hash string... */
142
+ unsigned char * hash = make_hash (& m );
143
143
144
+ /* and write the metainfo to file */
145
+ write_metainfo (file , & m , hash );
146
+
144
147
/* close the file stream */
145
148
close_file (file );
146
149
147
150
/* free allocated memory */
148
151
cleanup_metafile (& m );
152
+ free (hash );
149
153
150
154
/* yeih! everything seemed to go as planned */
151
155
return EXIT_SUCCESS ;
You can’t perform that action at this time.
0 commit comments