This time free the memory returned by crypt() only once. This way
the leak is avoided and also double free error is avoided also.
The patch fixes the following valgrind compaint:
43 bytes in 1 blocks are still reachable in loss record 1 of 1
at 0x4026844: malloc (vg_replace_malloc.c:263)
by 0x40268BE: realloc (vg_replace_malloc.c:632)
by 0x41EE411: __md5_crypt (in /lib/libcrypt-2.13.so)
by 0x41EDA56: crypt (in /lib/libcrypt-2.13.so)
by 0x805F702: newcamd_login (camd-newcamd.c:297)
by 0x9F0B10: ???
Without this if the input is MPTS, tsdecrypt incorrectly tries to
decrypt (and brokes) services that do not belong to the chosen
input services. An additional extra is that with this decrypting
a service in MPTS is a lot quicker since lots of unneeded work is
avoided.
With this patch valgrind compains about leaked 43 bytes but
without the patch glibc reports double free the second time
newcamd_login() is called and crashes the program. Since the
leak is not bad (it is a static buffer allocated by glibc) just
ignore valgrind in this case.
camd: Do not stop ECM/EMM processing thread when the incomming message is NULL.
If the message is NULL just continue. Breaking out of the loop is
wrong because it stops the ecm/processing thread and leaves tsdecrypt
in a non working state.
Rename --output-filter parameter to --no-output-filter.
no-output-filter better describes what the parameter does.
Also fix man page description. output-filter still works but
it is undocumented and kept only for backwards compatability.