main.c: fix strncat call to prevent buffer overflow

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
main.c: fix another potential buffer overflow in strncat() call

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
civetweb.c: remove dead assignment of 'res' in match_prefix()

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
civetweb.c: remove dead assignemnt of 'keep_alive'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
civetweb.c: remove some dead assignments related to 'sock'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
civetweb.c: fix potential memory leak in set_ports_options

Free 'ptr' in case realloc was successful, but the next check fails.

Fix for clang scan-build report:

5886 if (!success) {

    35 Potential leak of memory pointed to by 'ptr'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Merge pull request #22 from dalgaaf/wip-da-sca-20140513

Fixes from clang scan-build