]> git.llucax.com Git - z.facultad/75.06/jacu.git/blobdiff - src/statichuff/statichuff.c
Taken care of mem leaks
[z.facultad/75.06/jacu.git] / src / statichuff / statichuff.c
index b1896e0231892638975f5f28b18190a9bd19f9df..db164d285cf00aab08c84573b7d01e897b19e511 100644 (file)
@@ -255,6 +255,11 @@ int shuff_encode_file(char *inputfile, char *outputfile)
        /* Encodeo byte per byte */
        shuff_encode_symbols(freqtable,codetable,inputfile,outputfile);
        
+       /* Free up memory baby yeah */
+       free(freqtable);
+       free(inputlist);        
+       free(codetable);
+       
        return 1;
 }
 
@@ -316,6 +321,10 @@ int shuff_decode_file(char *inputfile, char *outputfile)
        fclose(fpsource);
        fclose(fpdest);
        
+       /* Free up memory baby yeah */
+       free(ftable);
+       free(inputlist);
+       
        return 1;
 }