prism54 Fix reference to uninitialized pointer
Subsystems (3)
PATCH 1/1 prism54 Fix reference to uninitialized pointer
2004-07-15 Margit Schubert-While <[email protected]>
* oid_mgt.c is calling islpci_mgt_transaction passing the address of a pointer to the management frame. This is not being initialized by the caller. The callee only updates this pointer when successful. When not, boom.
* Being ultracautious again, not only initialize in the caller, also null out the pointer unconditionally in the callee.
Margit
drivers/net/wireless/prism54/islpci_mgt.c +2 -0
@@ -458,6 +458,8 @@int err;DEFINE_WAIT (wait); + *recvframe =NULL ; +if (down_interruptible (&priv->mgmt_sem))return -ERESTARTSYS ;
drivers/net/wireless/prism54/oid_mgt.c +2 -2
@@ -408,7 +408,7 @@ mgt_set_request(islpci_private *priv, enum oid_num_t n, int extra, void *data) {int ret =0 ; -struct islpci_mgmtframe *response; +struct islpci_mgmtframe *response =NULL ;int response_op =PIMFOR_OP_ERROR ;int dlen;void *cache, *_data = data;
@@ -620,7 +620,7 @@static int mgt_update_addr (islpci_private *priv) { -struct islpci_mgmtframe *res; +struct islpci_mgmtframe *res =NULL ;int ret; ret = islpci_mgt_transaction(priv->ndev, PIMFOR_OP_GET,
_______________________________________________
Prism54-devel mailing list
[email protected]
http://prism54.org/mailman/listinfo/prism54-devel
Jeff Garzik
Appliedapplied