Lines Matching refs:newfl
375 struct file_lock *newfl; in allocate_file_lock() local
384 newfl = malloc(sizeof(*newfl) - sizeof(newfl->client_name) + n + 1); in allocate_file_lock()
385 if (newfl == NULL) { in allocate_file_lock()
388 bzero(newfl, sizeof(*newfl) - sizeof(newfl->client_name)); in allocate_file_lock()
389 memcpy(newfl->client_name, caller_name, n); in allocate_file_lock()
390 newfl->client_name[n] = 0; in allocate_file_lock()
392 newfl->client.oh.n_bytes = malloc(lockowner->n_len); in allocate_file_lock()
393 if (newfl->client.oh.n_bytes == NULL) { in allocate_file_lock()
394 free(newfl); in allocate_file_lock()
397 newfl->client.oh.n_len = lockowner->n_len; in allocate_file_lock()
398 bcopy(lockowner->n_bytes, newfl->client.oh.n_bytes, lockowner->n_len); in allocate_file_lock()
400 newfl->client_cookie.n_bytes = malloc(matchcookie->n_len); in allocate_file_lock()
401 if (newfl->client_cookie.n_bytes == NULL) { in allocate_file_lock()
402 free(newfl->client.oh.n_bytes); in allocate_file_lock()
403 free(newfl); in allocate_file_lock()
406 newfl->client_cookie.n_len = matchcookie->n_len; in allocate_file_lock()
407 bcopy(matchcookie->n_bytes, newfl->client_cookie.n_bytes, matchcookie->n_len); in allocate_file_lock()
409 newfl->addr = malloc(addr->sa_len); in allocate_file_lock()
410 if (newfl->addr == NULL) { in allocate_file_lock()
411 free(newfl->client_cookie.n_bytes); in allocate_file_lock()
412 free(newfl->client.oh.n_bytes); in allocate_file_lock()
413 free(newfl); in allocate_file_lock()
416 memcpy(newfl->addr, addr, addr->sa_len); in allocate_file_lock()
418 return newfl; in allocate_file_lock()
1906 struct file_lock *newfl; in getlock() local
1916 newfl = allocate_file_lock(&lckarg->alock.oh, &lckarg->cookie, in getlock()
1918 if (newfl == NULL) { in getlock()
1930 fill_file_lock(newfl, (fhandle_t *)lckarg->alock.fh.n_bytes, in getlock()
1941 debuglog("Pointer to new lock is %p\n",newfl); in getlock()
1943 retval = do_lock(newfl); in getlock()
1945 debuglog("Pointer to new lock is %p\n",newfl); in getlock()
1959 deallocate_file_lock(newfl); in getlock()