Thread (13 messages) 13 messages, 5 authors, 2016-06-15

Re: [PATCH 3/3] for-each-ref: introduce %(upstream:track[short])

flat view

From: Ramkumar Ramachandra <hidden>
Date: 2016-06-15 22:58:54

Johannes Sixt wrote:
quoted
+                             else if (!num_ours) {
+                                     sprintf(buf, "[behind %d]", num_theirs);
+                                     v->s = xstrdup(buf);
+                             } else if (!num_theirs) {
+                                     sprintf(buf, "[ahead %d]", num_ours);
+                                     v->s = xstrdup(buf);
+                             } else {
+                                     sprintf(buf, "[ahead %d, behind %d]",
+                                             num_ours, num_theirs);
+                                     v->s = xstrdup(buf);
+                             }
These strdupped strings are leaked, right?
Yes, there's a minor leakage; there are quite a few instances of this
in the rest of the file. Do you see an easy fix?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help