[Ovirt-devel] [PATCH] Fixed a bug that caused ethtool_cmd to be accessed while uninitialized.

Darryl L. Pierce dpierce at redhat.com
Thu Aug 28 21:35:42 UTC 2008


Signed-off-by: Darryl L. Pierce <dpierce at redhat.com>
---
 ovirt-managed-node/ovirt-identify-node/gather.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/ovirt-managed-node/ovirt-identify-node/gather.c b/ovirt-managed-node/ovirt-identify-node/gather.c
index 39be6fd..a513b75 100644
--- a/ovirt-managed-node/ovirt-identify-node/gather.c
+++ b/ovirt-managed-node/ovirt-identify-node/gather.c
@@ -214,6 +214,7 @@ get_nic_data(char *nic, nic_info_ptr nic_info)
         ifr.ifr_addr.sa_family = AF_INET;
         strncpy(ifr.ifr_name, interface, IFNAMSIZ - 1);
 
+        ifr.ifr_data = (caddr_t)&ecmd;        
         ioctl(sockfd, SIOCETHTOOL, &ifr);
         close(sockfd);
 
-- 
1.5.5.1




More information about the ovirt-devel mailing list