tJust realloc(), don't leak if we get called more than once - ratox - FIFO based tox client
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 1a43beddb893b9198103a42aac3e8773f1af3cef
(DIR) parent c172129d1e28cf27ccb5d30f0648a73a726dc94e
(HTM) Author: sin <sin@2f30.org>
Date: Mon, 22 Sep 2014 12:23:23 +0100
Just realloc(), don't leak if we get called more than once
Diffstat:
M ratox.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
(DIR) diff --git a/ratox.c b/ratox.c
t@@ -564,7 +564,7 @@ readpass(void)
}
if (p[0] == '\0')
return -1;
- passphrase = malloc(strlen(p)); /* not null-terminated */
+ passphrase = realloc(passphrase, strlen(p)); /* not null-terminated */
if (!passphrase) {
perror("malloc");
exit(EXIT_FAILURE);