summaryrefslogtreecommitdiffstats
path: root/runtime/map.c
diff options
context:
space:
mode:
authorhunt <hunt>2006-01-16 08:33:35 +0000
committerhunt <hunt>2006-01-16 08:33:35 +0000
commitf903d01cf2ace79ec2f9a046e8072d0095b4928b (patch)
treeb82860b33db8b72e1dcab84fc3c8e85cd88eb1a2 /runtime/map.c
parent315b86df3e95c631b678d98b5d0ca7a380f1fed4 (diff)
downloadsystemtap-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.c10
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);