Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 879783 Details for
Bug 1079945
[abrt] iptraf-ng: rate_add_rate(): iptraf-ng killed by SIGSEGV
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
proposed patch
0001-bugfix-positionptr-properly-allocate-dynamicly-creat.patch (text/plain), 1.96 KB, created by
Vítězslav Samel
on 2014-03-28 10:45:20 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Vítězslav Samel
Created:
2014-03-28 10:45:20 UTC
Size:
1.96 KB
patch
obsolete
>From 4477637398d54d017c75d395f0236f38dd3a35b8 Mon Sep 17 00:00:00 2001 >From: Vitezslav Samel <vitezslav@samel.cz> >Date: Wed, 12 Mar 2014 13:51:19 +0100 >Subject: [PATCH] bugfix: positionptr(): properly allocate dynamicly created > interfaces > >When creating new entry in interface list (for interface created when >ifstats() already running) we must allocate/init the rate too. > >Fix this bug by creating new function alloc_iflist_entry() and use it >where appropriate. > >Signed-off-by: Vitezslav Samel <vitezslav@samel.cz> >--- > src/ifstats.c | 16 ++++++++++++---- > 1 files changed, 12 insertions(+), 4 deletions(-) > >diff --git a/src/ifstats.c b/src/ifstats.c >index 479c243..4af2a3a 100644 >--- a/src/ifstats.c >+++ b/src/ifstats.c >@@ -126,6 +126,15 @@ static int ifinlist(struct iflist *list, char *ifname) > return result; > } > >+static struct iflist *alloc_iflist_entry(void) >+{ >+ struct iflist *tmp = xmallocz(sizeof(struct iflist)); >+ >+ rate_alloc(&tmp->rate, 5); >+ >+ return tmp; >+} >+ > /* > * Initialize the list of interfaces. This linked list is used in the > * selection boxes as well as in the general interface statistics screen. >@@ -171,10 +180,9 @@ static void initiflist(struct iflist **list) > * At this point, the interface is now sure to be up and running. > */ > >- struct iflist *itmp = xmallocz(sizeof(struct iflist)); >- strcpy(itmp->ifname, ifname); >+ struct iflist *itmp = alloc_iflist_entry(); > itmp->ifindex = ifindex; >- rate_alloc(&itmp->rate, 5); >+ strcpy(itmp->ifname, ifname); > > /* make the linked list sorted by ifindex */ > struct iflist *cur = *list, *last = NULL; >@@ -211,7 +219,7 @@ static struct iflist *positionptr(struct iflist *iflist, const int ifindex) > } > /* no interface was found, try to create new one */ > if (ptmp == NULL) { >- struct iflist *itmp = xmallocz(sizeof(struct iflist)); >+ struct iflist *itmp = alloc_iflist_entry(); > itmp->ifindex = ifindex; > itmp->index = last->index + 1; > int r = dev_get_ifname(ifindex, itmp->ifname); >-- >1.7.8.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1079945
:
877989
|
877990
|
877991
|
877992
|
877993
|
877994
|
877995
|
877996
|
877997
|
877998
|
877999
| 879783