From 200f3b9081e41984c18ca62c8fcf4e9f3bdac6b9 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 15 Mar 2010 15:57:04 -0700 Subject: [PATCH] --- yaml --- r: 189197 b: refs/heads/master c: 5b3dbb44ab40660a080d03585bd35f45b2890c49 h: refs/heads/master i: 189195: b8d37744379b69c208d446f22cc0cbf82aa62b6d v: v3 --- [refs] | 2 +- trunk/fs/ceph/auth_x.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 79ca790aa505..e5afd63ddb2c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 807c86e2ceba8febe79b289d50cd0d5e0b0af917 +refs/heads/master: 5b3dbb44ab40660a080d03585bd35f45b2890c49 diff --git a/trunk/fs/ceph/auth_x.c b/trunk/fs/ceph/auth_x.c index 96e7aaa77678..33d3ad4dc456 100644 --- a/trunk/fs/ceph/auth_x.c +++ b/trunk/fs/ceph/auth_x.c @@ -156,6 +156,7 @@ static int ceph_x_proc_ticket_reply(struct ceph_auth_client *ac, struct timespec validity; struct ceph_crypto_key old_key; void *tp, *tpend; + struct ceph_buffer *new_ticket_blob; ceph_decode_need(&p, end, sizeof(u32) + 1, bad); @@ -223,9 +224,12 @@ static int ceph_x_proc_ticket_reply(struct ceph_auth_client *ac, ceph_decode_need(&tp, tpend, 1 + sizeof(u64), bad); struct_v = ceph_decode_8(&tp); th->secret_id = ceph_decode_64(&tp); - ret = ceph_decode_buffer(&th->ticket_blob, &tp, tpend); + ret = ceph_decode_buffer(&new_ticket_blob, &tp, tpend); if (ret) goto out; + if (th->ticket_blob) + ceph_buffer_put(th->ticket_blob); + th->ticket_blob = new_ticket_blob; dout(" got ticket service %d (%s) secret_id %lld len %d\n", type, ceph_entity_type_name(type), th->secret_id, (int)th->ticket_blob->vec.iov_len);