builtin/apply: remove misleading comment on lock_file field
authorJunio C Hamano <gitster@pobox.com>
Mon, 6 Jun 2016 20:11:02 +0000 (13:11 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 Jun 2016 20:11:02 +0000 (13:11 -0700)
Just like pointer field like prefix, the piece of memory pointed at
by lock_file field is not owned by the apply_state structure. It is
true that the caller needs to be careful about the lifetime rule for
lockfile instances, but that is none of this API's business.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/apply.c
index 7338ee6b68d48ec46436a621f6926be3e1252493..b3eb704725f954d8bdc4cd78e316e6fd95a3e731 100644 (file)
@@ -52,10 +52,7 @@ struct apply_state {
        const char *prefix;
        int prefix_length;
 
-       /*
-        * Since lockfile.c keeps a linked list of all created
-        * lock_file structures, it isn't safe to free(lock_file).
-        */
+       /* These are lock_file related */
        struct lock_file *lock_file;
        int newfd;