Message ID | 1406551689-8142-1-git-send-email-ilyan@dev.mellanox.co.il (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
thanks - applied -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/src/rsocket.c b/src/rsocket.c index c7a0cb2..7007897 100644 --- a/src/rsocket.c +++ b/src/rsocket.c @@ -3915,8 +3915,8 @@ static int rs_svc_grow_sets(struct rs_svc *svc, int grow_size) rss = set; contexts = set + sizeof(*rss) * svc->size; if (svc->cnt) { - memcpy(rss, svc->rss, sizeof(*rss) * svc->cnt); - memcpy(contexts, svc->contexts, svc->context_size * svc->cnt); + memcpy(rss, svc->rss, sizeof(*rss) * (svc->cnt + 1)); + memcpy(contexts, svc->contexts, svc->context_size * (svc->cnt + 1)); } free(svc->rss);