diff options
author | hunt <hunt> | 2006-01-16 08:33:35 +0000 |
---|---|---|
committer | hunt <hunt> | 2006-01-16 08:33:35 +0000 |
commit | f903d01cf2ace79ec2f9a046e8072d0095b4928b (patch) | |
tree | b82860b33db8b72e1dcab84fc3c8e85cd88eb1a2 /runtime/map.c | |
parent | 315b86df3e95c631b678d98b5d0ca7a380f1fed4 (diff) | |
download | systemtap-steved-f903d01cf2ace79ec2f9a046e8072d0095b4928b.tar.gz systemtap-steved-f903d01cf2ace79ec2f9a046e8072d0095b4928b.tar.xz systemtap-steved-f903d01cf2ace79ec2f9a046e8072d0095b4928b.zip |
2006-01-16 Martin Hunt <hunt@redhat.com>
* map.c (_stp_pmap_agg): Return NULL when aggregation
fails.
Diffstat (limited to 'runtime/map.c')
-rw-r--r-- | runtime/map.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/runtime/map.c b/runtime/map.c index 1d6d084e..1e9fd62a 100644 --- a/runtime/map.c +++ b/runtime/map.c @@ -850,7 +850,7 @@ static void _stp_add_agg(struct map_node *aptr, struct map_node *ptr) * A write lock must be held on the map during this function. * * @param map A pointer to a pmap. - * @returns a pointer to an aggregated map. + * @returns a pointer to the aggregated map. Null on failure. */ MAP _stp_pmap_agg (PMAP pmap) { @@ -885,8 +885,12 @@ MAP _stp_pmap_agg (PMAP pmap) } if (match) _stp_add_agg(aptr, ptr); - else - _stp_new_agg(agg, ahead, ptr); + else { + if (!_stp_new_agg(agg, ahead, ptr)) { + spin_unlock(&m->lock); + return NULL; + } + } } } spin_unlock(&m->lock); |