Fixed a double free error in serv_openid_rp.c
authorArt Cancro <ajc@citadel.org>
Mon, 2 Jun 2008 14:24:40 +0000 (14:24 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 2 Jun 2008 14:24:40 +0000 (14:24 +0000)
citadel/modules/openid/serv_openid_rp.c

index 4a87abc88996a2d0eb2f68b96ba02d5e35c054fd..bd883bf31e4b6110463879a2218a8aa0eaeca3d0 100644 (file)
@@ -501,7 +501,6 @@ void cmd_oidf(char *argbuf) {
        char thiskey[1024];
        char thisdata[1024];
        HashList *keys = NULL;
-       HashPos *HashPos;
        struct ctdl_openid *oiddata = (struct ctdl_openid *) CC->openid_data;
 
        keys = NewHash(1, NULL);
@@ -662,18 +661,21 @@ void cmd_oidf(char *argbuf) {
        }
        cprintf("000\n");
 
-       /* Free the hash list */
+       /*
+        * We will eventually do something with the data in the hash list.
+        *
        long len;
        void *Value;
        char *Key;
-
+       HashPos *HashPos;
        HashPos = GetNewHashPos();
        while (GetNextHashPos(keys, HashPos, &len, &Key, &Value)!=0)
        {
-               free(Value);
        }
        DeleteHashPos(&HashPos);
-       DeleteHash(&keys);
+        */
+
+       DeleteHash(&keys);              /* This will free() all the key data for us */
 }