Merge lp:~bregma/geis/lp-1152411 into lp:geis

Proposed by Stephen M. Webb
Status: Merged
Approved by: Mathieu Trudel-Lapierre
Approved revision: 307
Merged at revision: 307
Proposed branch: lp:~bregma/geis/lp-1152411
Merge into: lp:geis
Diff against target: 27 lines (+6/-1)
2 files modified
libgeis/backend/grail/geis_grail_token.c (+5/-1)
testsuite/libgeis/check_backend_token.c (+1/-0)
To merge this branch: bzr merge lp:~bregma/geis/lp-1152411
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Mathieu Trudel-Lapierre (community) Approve
Review via email: mp+156093@code.launchpad.net

Commit message

Properly clone Grail back end tokens to avoid double deletions (lp: #1152411).

Description of the change

Properly clone Grail back end tokens to avoid double deletions.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Looks fine, so approving. Let's try to get jenkins to retry asap, just to be really safe.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libgeis/backend/grail/geis_grail_token.c'
2--- libgeis/backend/grail/geis_grail_token.c 2012-09-05 14:59:39 +0000
3+++ libgeis/backend/grail/geis_grail_token.c 2013-03-29 00:51:20 +0000
4@@ -81,7 +81,11 @@
5 static GeisBackendToken
6 _geis_grail_token_clone(GeisBackendToken original)
7 {
8- return original;
9+ GeisGrailToken new_token = calloc(1, sizeof(struct GeisGrailToken));
10+ memcpy(new_token,
11+ _geis_grail_token_from_geis_token(original),
12+ sizeof(struct GeisGrailToken));
13+ return (GeisBackendToken)new_token;
14 }
15
16
17
18=== modified file 'testsuite/libgeis/check_backend_token.c'
19--- testsuite/libgeis/check_backend_token.c 2012-07-24 16:04:12 +0000
20+++ testsuite/libgeis/check_backend_token.c 2013-03-29 00:51:20 +0000
21@@ -36,6 +36,7 @@
22 fail_if(token1 == NULL, "failed to create token1");
23 token2 = geis_backend_token_clone(token1);
24 fail_if(token2 == NULL, "failed to create token2");
25+ fail_if(token2 == token1, "token clone failed");
26
27 geis_backend_token_compose(token1, token2);
28

Subscribers

People subscribed via source and target branches