ref: 589f99915eb95d9207c08259c8880675a0a502cf
parent: dab4f2afc76a7db84d81ebf9193acab56ff0aa2b
author: cinap_lenrek <cinap_lenrek@centraldogma>
date: Mon Dec 12 09:59:14 EST 2011
devssl: tiny fixes (from plan 9)
--- a/sys/src/9/port/devssl.c
+++ b/sys/src/9/port/devssl.c
@@ -760,7 +760,7 @@
if(waserror()){
if(b != nil)
- free(b);
+ freeb(b);
nexterror();
}
@@ -892,7 +892,7 @@
key[6] &= 0x0f;
}
- w->state = malloc(sizeof(DESstate));
+ w->state = smalloc(sizeof(DESstate));
if(w->slen >= 16)
setupDESstate(w->state, key, w->secret+8);
else if(w->slen >= 8)
@@ -928,7 +928,7 @@
if(w->slen > 5)
w->slen = 5;
- w->state = malloc(sizeof(RC4state));
+ w->state = smalloc(sizeof(RC4state));
setupRC4state(w->state, w->secret, w->slen);
}
@@ -947,7 +947,7 @@
if(w->slen > 16)
w->slen = 16;
- w->state = malloc(sizeof(RC4state));
+ w->state = smalloc(sizeof(RC4state));
setupRC4state(w->state, w->secret, w->slen);
}