Applied patch from Randy Hron:
==============================
valgrind shows a memory leak in parse_opts.c when running alarm01:

valgrind --leak-check=yes  --show-reachable=yes ./alarm01
==13861==
alarm01     1  PASS  :  alarm(1) returned 0
==13861==
==13861== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==13861== malloc/free: in use at exit: 14 bytes in 1 blocks.
==13861== malloc/free: 1 allocs, 0 frees, 14 bytes allocated.
==13861== For counts of detected errors, rerun with: -v
==13861== searching for pointers to 1 not-freed blocks.
==13861== checked 3622444 bytes.
==13861==
==13861== 14 bytes in 1 blocks are definitely lost in loss record 1 of 1
==13861==    at 0x400289B9: malloc (in /usr/local/lib/valgrind/vgskin_memcheck.so)
==13861==    by 0x8048F0D: (within /usr/src/sources/l/ltp-full-20031204/testcases/kernel/syscalls/alarm/alarm01)
==13861==    by 0x402627C6: __libc_start_main (in /lib/libc-2.3.2.so)
==13861==    by 0x8048BA0: (within /usr/src/sources/l/ltp-full-20031204/testcases/kernel/syscalls/alarm/alarm01)
==13861==
==13861== LEAK SUMMARY:
==13861==    definitely lost: 14 bytes in 1 blocks.
==13861==    possibly lost:   0 bytes in 0 blocks.
==13861==    still reachable: 0 bytes in 0 blocks.
==13861==         suppressed: 0 bytes in 0 blocks.
==13861==

This fixes the memory leak.

--- ltp-full-20031204/lib/parse_opts.c.orig		 2000-09-06 10:33:29.000000000 -0400
+++ ltp-full-20031204/lib/parse_opts.c		 2004-01-02 17:21:49.823868616 -0500
@@ -326,6 +326,7 @@
 		 }

     }    /* end of while */
+    free(optionstr);

     STD_argind = optind;


--
Randy Hron
==============================
1 file changed