viced-malloc-dont-make-assumptions-about-the-compiler-20020524
[openafs.git] / src / viced / host.c
index 98de75d..2748f2b 100644 (file)
@@ -987,7 +987,7 @@ retry:
        code = RXAFSCB_WhoAreYou(host->callback_rxcon, &interf);
        H_LOCK
        if ( code == RXGEN_OPCODE ) {
-               identP = (struct Identity *)malloc(1);
+               identP = (struct Identity *)malloc(sizeof(struct Identity));
                identP->valid = 0;
                rx_SetSpecific(tcon, rxcon_ident_key, identP);
                /* The host on this connection was unable to respond to 
@@ -1072,7 +1072,7 @@ retry:
                code = RXAFSCB_WhoAreYou(host->callback_rxcon, &interf);
                H_LOCK
                if ( code == RXGEN_OPCODE ) {
-                   identP = (struct Identity *)malloc(1);
+                 identP = (struct Identity *)malloc(sizeof(struct Identity));
                    identP->valid = 0;
                    rx_SetSpecific(tcon, rxcon_ident_key, identP);
                    ViceLog(25,