summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2007-05-14 18:57:31 -0700
committerAlan Coopersmith <alan.coopersmith@sun.com>2007-05-14 18:57:31 -0700
commit1a142e8b29113bbd9daf21b8371f1572cd0152dd (patch)
treec7fa03bc3b086e247b96c4db76f4559037564e2f
parent4c1bd3d698bbb2ec4c1f8d3744549ec44c58d1bf (diff)
Coverity #1089: Double frees in error cleanup path
Double free of pointer "(auth)->auth_data" in call to "free" Double free of pointer "(auth)->protocol_data" in call to "free"
-rw-r--r--process.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/process.c b/process.c
index 3a30d70..c235cb9 100644
--- a/process.c
+++ b/process.c
@@ -1447,14 +1447,14 @@ cant_add:
{
if (auth->protocol_name)
free (auth->protocol_name);
- if (auth->protocol_data)
- free (auth->protocol_data);
+ /* auth->protocol_data already freed,
+ since it's the same as protodata */
if (auth->network_id)
free (auth->network_id);
if (auth->auth_name)
free (auth->auth_name);
- if (auth->auth_data)
- free (auth->auth_data);
+ /* auth->auth_data already freed,
+ since it's the same as authdata */
free ((char *) auth);
}