Check-in [086da3a301]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Two small memory leaks, also noticed by Martin Prikryl.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 086da3a3011e1ab7b8cf9dd8b0b5a6996b39a05a
User & Date: simon 2004-01-21 13:41:34.000
Context
2004-01-21
13:45
Theo Markettos's unsigned-vs-signed-char pedantry patch. check-in: d58f7637c1 user: simon tags: trunk
13:41
Two small memory leaks, also noticed by Martin Prikryl. check-in: 086da3a301 user: simon tags: trunk
13:33
Martin Prikryl points out that need_pw may be used uninitialised. check-in: e13b2bf694 user: simon tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to ssh.c.
5194
5195
5196
5197
5198
5199
5200

5201
5202
5203
5204
5205
5206
5207
				     sigblob, sigblob_len);
		    sfree(pkblob);
		    sfree(sigblob);
		    sfree(sigdata);

		    ssh2_pkt_send(ssh);
		    s->type = AUTH_TYPE_PUBLICKEY;

		}
	    } else if (s->method == AUTH_PASSWORD) {
		/*
		 * We send the password packet lumped tightly together with
		 * an SSH_MSG_IGNORE packet. The IGNORE packet contains a
		 * string long enough to make the total length of the two
		 * packets constant. This should ensure that a passive







>







5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
				     sigblob, sigblob_len);
		    sfree(pkblob);
		    sfree(sigblob);
		    sfree(sigdata);

		    ssh2_pkt_send(ssh);
		    s->type = AUTH_TYPE_PUBLICKEY;
		    key->alg->freekey(key->data);
		}
	    } else if (s->method == AUTH_PASSWORD) {
		/*
		 * We send the password packet lumped tightly together with
		 * an SSH_MSG_IGNORE packet. The IGNORE packet contains a
		 * string long enough to make the total length of the two
		 * packets constant. This should ensure that a passive
Changes to sshbn.c.
905
906
907
908
909
910
911

912
913
914
915
916
917
918
	a = b;
	b = t;
	t = xp;
	xp = x;
	x = bigmuladd(q, xp, t);
	sign = -sign;
	freebn(t);

    }

    freebn(b);
    freebn(a);
    freebn(xp);

    /* now we know that sign * x == 1, and that x < modulus */







>







905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
	a = b;
	b = t;
	t = xp;
	xp = x;
	x = bigmuladd(q, xp, t);
	sign = -sign;
	freebn(t);
	freebn(q);
    }

    freebn(b);
    freebn(a);
    freebn(xp);

    /* now we know that sign * x == 1, and that x < modulus */