diff options
author | Walter de Jong <walter@heiho.net> | 2013-03-28 22:55:35 +0100 |
---|---|---|
committer | Walter de Jong <walter@heiho.net> | 2013-03-28 22:55:35 +0100 |
commit | e9fd08a5d571c852f1f47f0e4cead8161a919d0b (patch) | |
tree | f099daeb3ff7e43d0b5480d33b855afbffdc0bee /libtac/lib/connect.c | |
parent | 8a305d6b868e418e5849375e1904e79438fd0561 (diff) | |
download | pam_tacplus-e9fd08a5d571c852f1f47f0e4cead8161a919d0b.tar.gz pam_tacplus-e9fd08a5d571c852f1f47f0e4cead8161a919d0b.zip |
added FIXME remark about leaking memory
Diffstat (limited to 'libtac/lib/connect.c')
-rw-r--r-- | libtac/lib/connect.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libtac/lib/connect.c b/libtac/lib/connect.c index 1844381..1ec4c5f 100644 --- a/libtac/lib/connect.c +++ b/libtac/lib/connect.c @@ -67,7 +67,7 @@ int tac_connect(struct addrinfo **server, char **key, int servers) { * >= 0 : valid fd * < 0 : error status code, see LIBTAC_STATUS_... */ -int tac_connect_single(struct addrinfo *server, char *key) { +int tac_connect_single(struct addrinfo *server, const char *key) { int retval = LIBTAC_STATUS_CONN_ERR; /* default retval */ int fd = -1; int flags, rc; @@ -83,6 +83,7 @@ int tac_connect_single(struct addrinfo *server, char *key) { } /* format server address into a string for use in messages */ + /* FIXME this leaks memory, ip is not free()d */ ip = tac_ntop(server->ai_addr, 0); if((fd=socket(server->ai_family, server->ai_socktype, server->ai_protocol)) < 0) { |