[users at i-scream] small patch for network_stats.c
Tim Bishop
tim at bishnet.net
Mon Feb 9 08:48:13 GMT 2004
Ron,
Thanks for the fix. We'd already fixed this bug in a rewrite of that
section of code.
Cheers,
Tim.
On Mon, Feb 09, 2004 at 09:10:38AM +0100, Ron Arts wrote:
> Hi,
>
> don't know if this is already fixed in newer releases,
> but anyway, my program crashed on it so here's the patch
>
> Regards,
> Ron Arts
>
> Very small fix for libstatgrab: check pointer:
>
> diff -c -r1.1 network_stats.c
> *** network_stats.c 4 Dec 2003 18:59:17 -0000 1.1
> --- network_stats.c 9 Feb 2004 08:07:17 -0000
> ***************
> *** 284,289 ****
> --- 284,292 ----
> network_stats_diff_ptr++;
> }
> network_stats_ptr=get_network_stats(&ifaces);
> + if(network_stats_ptr==NULL){
> + return NULL;
> + }
> network_stats_diff_ptr=network_stats_diff;
>
> for(x=0;x<sizeof_net_stats_diff;x++){
>
--
Tim Bishop
http://www.bishnet.net/tim
PGP Key: 0x5AE7D984
More information about the users
mailing list