From: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> Signed-off-by: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> --- dlink.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlink.c b/dlink.c index d734281..168ca2f 100644 --- a/dlink.c +++ b/dlink.c @@ -15,8 +15,10 @@ void *dl_head() { void *h; h = dl_alloc(0); - dl_next(h) = h; - dl_prev(h) = h; + if (h) { + dl_next(h) = h; + dl_prev(h) = h; + } return h; } -- 1.7.6.4 -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html