Weird behaviour on error conditions 3

Create issue
Issue #64 resolved
Tygre repo owner created an issue
Fortify: Memory leak detected leaving scope at main.c.157
   Address     Size Allocator
0x6917e98c      163 http.c.381
0x6917e484       39 http.c.1280
0x6917e3fc       28 http.c.1256
0x6917e334       86 utils.c.427
0x6917e2b4       15 http.c.1409
0x6917e244        3 http.c.1224
0x6917e1cc       12 http.c.1189
0x6917e154        5 http.c.1053
0x6917e0bc       40 http.c.1005
     total      391 bytes in 9 blocks with 936 bytes overhead

Fortify: Statistics at main.c.158
         Memory currently allocated: 391 bytes in 9 blocks
         Maximum memory allocated at one time: 1425616 bytes in 205 blocks
         There have been 22120 allocations and 22111 deallocations
         There was a total of 46997634 bytes allocated
         The average allocation was 2124 bytes

Comments (9)

  1. Tygre reporter
    Fortify: Memory leak detected leaving scope at main.c.157
       Address     Size Allocator
    0x6917e98c      163 http.c.381
    0x6917e484       39 http.c.1280
    0x6917e3fc       28 http.c.1256
    0x6917e334       86 utils.c.427
    0x6917e2b4       15 http.c.1409
    0x6917e244        3 http.c.1224
    0x6917e1cc       12 http.c.1189
    0x6917e154        5 http.c.1053
    0x6917e0bc       40 http.c.1005
         total      391 bytes in 9 blocks with 936 bytes overhead
    
    Fortify: Statistics at main.c.158
             Memory currently allocated: 391 bytes in 9 blocks
             Maximum memory allocated at one time: 1425616 bytes in 205 blocks
             There have been 22120 allocations and 22111 deallocations
             There was a total of 46997634 bytes allocated
             The average allocation was 2124 bytes
    
  2. Tygre reporter
    Fortify: Memory leak detected leaving scope at main.c.157
       Address     Size Allocator
    0x40885894      164 http.c.381
    0x4088538c       40 http.c.1280
    0x40885304       28 http.c.1256
    0x4088523c       87 utils.c.442
    0x408851bc       15 http.c.1409
    0x40884fe4        3 http.c.1224
    0x40884f6c       12 http.c.1189
    0x40884ef4        5 http.c.1053
    0x40884e5c       40 http.c.1005
    0x40ad7b7c      199 http.c.381
    0x40ad7ac4       72 http.c.1280
    0x40ad7a3c       27 http.c.1256
    0x40ad7954      122 utils.c.442
    0x40ad716c       15 http.c.1409
    0x40ad6a44        3 http.c.1224
    0x40ad7004       16 http.c.1189
    0x40ad6e6c        5 http.c.1053
    0x40ad6f6c       40 http.c.1005
         total      893 bytes in 18 blocks with 1872 bytes overhead
    
    Fortify: Statistics at main.c.158
             Memory currently allocated: 893 bytes in 18 blocks
             Maximum memory allocated at one time: 126248136 bytes in 226 blocks
             There have been 38746 allocations and 38728 deallocations
             There was a total of 426554635 bytes allocated
             The average allocation was 11008 bytes
    
  3. Tygre reporter
    Fortify: Memory leak detected leaving scope at main.c.157
       Address     Size Allocator
    0x690ed5ec      184 http.c.381
    0x68f49edc       57 http.c.1291
    0x68f49e54       27 http.c.1267
    0x68f49434      107 utils.c.427
    0x68f492a4       15 http.c.1420
    0x68f491ac        3 http.c.1235
    0x69048704       16 http.c.1200
    0x6904868c        5 http.c.1064
    0x690485f4       40 http.c.1016
         total      454 bytes in 9 blocks with 936 bytes overhead
    
    Fortify: Statistics at main.c.158
             Memory currently allocated: 454 bytes in 9 blocks
             Maximum memory allocated at one time: 878338 bytes in 130 blocks
             There have been 24522 allocations and 24513 deallocations
             There was a total of 87831185 bytes allocated
             The average allocation was 3581 bytes
    
  4. Tygre reporter
    Fortify: Memory leak detected leaving scope at main.c.157
       Address     Size Allocator
    0x69076984      175 http.c.381
    0x69076474       48 http.c.1280
    0x690763ec       27 http.c.1256
    0x6907631c       98 utils.c.427
    0x6907629c       15 http.c.1409
    0x6907622c        3 http.c.1224
    0x690761ac       16 http.c.1189
    0x69076134        5 http.c.1053
    0x6907609c       40 http.c.1005
    0x690fde94      151 http.c.381
    0x690fd99c       27 http.c.1280
    0x690fd914       28 http.c.1256
    0x690fd85c       74 utils.c.427
    0x690fd7dc       15 http.c.1409
    0x690fd76c        3 http.c.1224
    0x690fd6f4       12 http.c.1189
    0x690fd67c        5 http.c.1053
    0x690fd5e4       40 http.c.1005
    0x690788b4      175 http.c.381
    0x690783a4       48 http.c.1280
    0x6907831c       27 http.c.1256
    0x6907824c       98 utils.c.427
    0x690781cc       15 http.c.1409
    0x6907815c        3 http.c.1224
    0x690780dc       16 http.c.1189
    0x69078064        5 http.c.1053
    0x69077fcc       40 http.c.1005
         total     1209 bytes in 27 blocks with 2808 bytes overhead
    
    Fortify: Statistics at main.c.158
             Memory currently allocated: 1209 bytes in 27 blocks
             Maximum memory allocated at one time: 2823680 bytes in 203 blocks
             There have been 45277 allocations and 45250 deallocations
             There was a total of 595973797 bytes allocated
             The average allocation was 13162 bytes
    
  5. Tygre reporter
    Fortify: Memory leak detected leaving scope at main.c.157
       Address     Size Allocator
    0x690a899c      181 http.c.381
    0x690a8484       54 http.c.1291
    0x690a83fc       27 http.c.1267
    0x690a8324      104 utils.c.427
    0x690a82a4       15 http.c.1420
    0x690a8234        3 http.c.1235
    0x690a81b4       16 http.c.1200
    0x690a813c        5 http.c.1064
    0x690a80a4       40 http.c.1016
         total      445 bytes in 9 blocks with 936 bytes overhead
    
    Fortify: Statistics at main.c.158
             Memory currently allocated: 445 bytes in 9 blocks
             Maximum memory allocated at one time: 3002777 bytes in 186 blocks
             There have been 9614 allocations and 9605 deallocations
             There was a total of 80285453 bytes allocated
             The average allocation was 8350 bytes
    
  6. Tygre reporter
    • edited description
    • changed status to resolved

    Difficult to test but the logic says that of the server did not answer, hresp would be NULL and some allocated memory was not freed... First attempt!

  7. Log in to comment