uclient-fetch: fix potential memory leaks
authorPetr Štetiar <ynezz@true.cz>
Tue, 8 Dec 2020 16:45:19 +0000 (17:45 +0100)
committerPetr Štetiar <ynezz@true.cz>
Fri, 11 Dec 2020 10:17:22 +0000 (11:17 +0100)
commit86a2ac6ac46ffb3f71e84debd03f7f16add148e5
treeb0eae1b70ca857f6e899cbb7616d6556ae7a2ce3
parent158dd9dd289ca3fe1feb1c580ab2a8014d2ffb78
uclient-fetch: fix potential memory leaks

Fixes following issue reported by clang-12 static analyzer:

 uclient-fetch.c:612:25: warning: Potential leak of memory pointed to by 'username' [unix.Malloc]
                                 memset(optarg, '*', strlen(optarg));
                                                     ^~~~~~~~~~~~~~
 uclient-fetch.c:618:25: warning: Potential leak of memory pointed to by 'password' [unix.Malloc]
                                 memset(optarg, '*', strlen(optarg));
                                                     ^~~~~~~~~~~~~~

Signed-off-by: Petr Štetiar <ynezz@true.cz>
uclient-fetch.c