Opened 8 years ago

Closed 8 years ago

#5068 closed defect (fixed)

memory leak in obfsproxy when using weird args

Reported by: arma Owned by: asn
Priority: Medium Milestone:
Component: Archived/Obfsproxy Version:
Severity: Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


valgrind --leak-check=yes ./obfsproxy obfs2 --log-file=logfile --dest= server


[warn] obfs2: Unknown argument '--log-file=logfile'.
[warn] You failed at creating a correct obfs2 line.

but also

==9488== 144 (16 direct, 128 indirect) bytes in 1 blocks are definitely lost in loss record 2 of 2
==9488==    at 0x4C244E8: malloc (vg_replace_malloc.c:236)
==9488==    by 0x406883: xmalloc (util.c:57)
==9488==    by 0x40852A: smartlist_create (container.c:27)
==9488==    by 0x40B305: launch_external_proxy (external.c:28)
==9488==    by 0x402427: obfs_main (main.c:262)
==9488==    by 0x542CC8C: (below main) (libc-start.c:228)

Child Tickets

Attachments (1)

0001-bug5068.patch (793 bytes) - added by blackpaw 8 years ago.

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by blackpaw

Attachment: 0001-bug5068.patch added

comment:1 Changed 8 years ago by blackpaw

Status: newneeds_review

I wrote one line of code and now Valgrind has no complaints.

valgrind --leak-check=yes ./obfsproxy obfs2 --log-file=logfile --dest=! server !

2012-02-12 12:22:48 [warn] obfs2: Unknown argument '--log-file=logfile'.
2012-02-12 12:22:48 [warn] You failed at creating a correct obfs2 line.
==11227== HEAP SUMMARY:
==11227==     in use at exit: 0 bytes in 0 blocks
==11227==   total heap usage: 13 allocs, 13 frees, 3,197 bytes allocated
==11227== All heap blocks were freed -- no leaks are possible

comment:2 Changed 8 years ago by arma

Resolution: fixed
Status: needs_reviewclosed

Merged. Thanks!

Note: See TracTickets for help on using tickets.