]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[iksemel] Fix potential memory leak in iksroster
authorAndrey Volk <andywolk@gmail.com>
Wed, 5 Jan 2022 16:14:27 +0000 (19:14 +0300)
committerAndrey Volk <andywolk@gmail.com>
Tue, 9 Aug 2022 20:41:10 +0000 (23:41 +0300)
libs/iksemel/tools/iksroster.c

index e97f81cd15793d423a7d84022e5e7ceab093cf8f..71237972b3c0ce95a423e258449d322f40e2ce45 100644 (file)
@@ -299,6 +299,7 @@ main (int argc, char *argv[])
                                strtok (to_pw, "\r\n");
                                break;
                        case 'f':
+                               if (file) free(file);
                                file = strdup (optarg);
                                break;
                        case 't':